Exception: GoogleDistanceMatrix::ServerError

Inherits:
Error
  • Object
show all
Defined in:
lib/google_distance_matrix/errors.rb

Overview

Public: Got a request error back trying to do a request

This includes wire errors like timeouts etc, and server errors like 5xx. Inspect error_or_response for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_or_response) ⇒ ServerError

Returns a new instance of ServerError.



40
41
42
# File 'lib/google_distance_matrix/errors.rb', line 40

def initialize(error_or_response)
  @error_or_response = error_or_response
end

Instance Attribute Details

#error_or_responseObject (readonly)

Returns the value of attribute error_or_response.



38
39
40
# File 'lib/google_distance_matrix/errors.rb', line 38

def error_or_response
  @error_or_response
end

Instance Method Details

#to_sObject



44
45
46
# File 'lib/google_distance_matrix/errors.rb', line 44

def to_s
  "GoogleDistanceMatrix::ServerError - #{error_or_response.inspect}."
end