<commit_before>require 'rest-client'

class TSheets::RestAdapter < TSheets::Adapter
  class << self
    def get(url, options)
      RestClient.get url, options
    end

    def post(url, data, options)
      RestClient.post url, data, options
    end

    def put(url, data, options)
      RestClient.put url, data, options
    end

    def delete(url, data, options)
      RestClient.delete url, data, options
    end
  end
end
<commit_msg>Fixed the issue with intercepting errors<commit_after>require 'rest-client'

class TSheets::RestAdapter < TSheets::Adapter
  class << self
    def get(url, options)
      RestClient.get url, options
    end

    def post(url, data, options)
      RestClient.post url, data.to_json, options
    rescue => e
      e.response
    end

    def put(url, data, options)
      RestClient.put url, data.to_json, options
    rescue => e
      e.response
    end

    def delete(url, data, options)
      RestClient.delete url, data.to_json, options
    rescue => e
      e.response
    end
  end
end

{'fraction_non_alphanumeric': 0.0872093023255814, 'fraction_numerical': 0.0, 'mean_word_length': 2.6631205673758864, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6858344', 'n_tokens_mistral': 328, 'n_tokens_neox': 323, 'n_words': 100}