Exception: Shippo::Exceptions::APIServerError
- Defined in:
- lib/shippo/exceptions/api_server_error.rb
Overview
The APIServerError
happens when the server returns a parseable JSON response, but when such response indicates a failed operation due to either validation or other business, data or logic issues.
The error adds the HTTP response message member, which would typically be “400 Bad Request”
Instance Attribute Summary
Attributes inherited from APIError
#http_response_message, #request, #response
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, request = nil, response = nil, http_response_message = nil) ⇒ APIServerError
constructor
A new instance of APIServerError.
- #to_s_members ⇒ Object
Methods inherited from APIError
Methods inherited from Error
Constructor Details
#initialize(message = nil, request = nil, response = nil, http_response_message = nil) ⇒ APIServerError
Returns a new instance of APIServerError.
15 16 17 18 |
# File 'lib/shippo/exceptions/api_server_error.rb', line 15 def initialize( = nil, request = nil, response = nil, = nil) super(, request, response) self. = end |
Instance Method Details
#to_s_members ⇒ Object
20 21 22 |
# File 'lib/shippo/exceptions/api_server_error.rb', line 20 def to_s_members %i(http_response_message) + super end |