lib/firstclasspostcodes/client.rb
# The Configuration object holding settings to be used in the API client.
The Configuration object holding settings to be used in the API client.
The Configuration object holding settings to be used in the API client .
def handle_request_error(response)
      raise ResponseError.new("Connection timed out", "timeout") if response.timed_out?
      raise ResponseError.new(response.return_message, "liberror") if response.code == 0
      error = begin
                JSON.parse(response.body, symbolize_names: true)
              rescue JSON::ParserError
                response.body
              end
      raise ResponseError.new(error, "network-error")
    end
def handle_request_error ( response ) raise ResponseError . new ( "Connection timed out" , "timeout" ) if response . timed_out? raise ResponseError . new ( response . return_message , "liberror" ) if response . code == 0 error = begin JSON . parse ( response . body , symbolize_names : true ) rescue JSON :: ParserError response . body end raise ResponseError . new ( error , "network-error" ) end
The Configuration object holding settings to be used in the API client.
The Configuration object holding settings to be used in the API client .
response
<not_specific>