Exception: HttpApiClient::Errors::BaseError
- Inherits:
-
StandardError
- Object
- StandardError
- HttpApiClient::Errors::BaseError
- Defined in:
- lib/http_api_client/errors.rb
Direct Known Subclasses
BadGateway, BadRequest, Forbidden, GatewayTimeout, InternalServerError, MethodNotAllowed, NotAcceptable, NotFound, NotImplemented, RequestTimeout, ServiceUnavailable, TooManyRequests, Unauthorized, UnknownStatus, UnprocessableEntity
Instance Attribute Summary collapse
-
#nested_error ⇒ Object
readonly
Returns the value of attribute nested_error.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
Instance Method Summary collapse
-
#initialize(message, response_body, nested_error = nil) ⇒ BaseError
constructor
A new instance of BaseError.
- #message ⇒ Object
Constructor Details
#initialize(message, response_body, nested_error = nil) ⇒ BaseError
Returns a new instance of BaseError.
11 12 13 14 15 16 |
# File 'lib/http_api_client/errors.rb', line 11 def initialize(, response_body, nested_error = nil) super() = @response_body = response_body @nested_error = nested_error end |
Instance Attribute Details
#nested_error ⇒ Object (readonly)
Returns the value of attribute nested_error.
9 10 11 |
# File 'lib/http_api_client/errors.rb', line 9 def nested_error @nested_error end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
9 10 11 |
# File 'lib/http_api_client/errors.rb', line 9 def response_body @response_body end |
Instance Method Details
#message ⇒ Object
18 19 20 21 22 23 |
# File 'lib/http_api_client/errors.rb', line 18 def = [] << nested_error. if nested_error << response_body .join("\n\n") end |