<commit_before>module Teamlab

  class Response

    attr_reader :body, :error, :code, :success

    def initialize(http_response)
      @code = http_response.code
      @success = @code < 400
      fail 'Error 404' if @code == 404
      fail TimeoutError, 'Portal is warming up' unless http_response.parsed_response.include?('portal is being warmed')
      @body = http_response.respond_to?(:parsed_response) && http_response.parsed_response.key?('result') ? http_response.parsed_response['result'] : http_response.to_hash
      @error = @body['error']['message'] if @body.key?('error') && @body['error'].key?('message')
    end<commit_msg>Fix typo in identifying that portal is warming up<commit_after>module Teamlab

  class Response

    attr_reader :body, :error, :code, :success

    def initialize(http_response)
      @code = http_response.code
      @success = @code < 400
      fail 'Error 404' if @code == 404
      fail TimeoutError, 'Portal is warming up' if http_response.parsed_response.include?('portal is being warmed')
      @body = http_response.respond_to?(:parsed_response) && http_response.parsed_response.key?('result') ? http_response.parsed_response['result'] : http_response.to_hash
      @error = @body['error']['message'] if @body.key?('error') && @body['error'].key?('message')
    end
{'fraction_non_alphanumeric': 0.1354642313546423, 'fraction_numerical': 0.0136986301369863, 'mean_word_length': 4.45643153526971, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3675343', 'n_tokens_mistral': 415, 'n_tokens_neox': 395, 'n_words': 95}