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.
12 13 14 15 16 17 |
# File 'lib/http_api_client/errors.rb', line 12 def initialize(, response_body, nested_error = nil) super() @message = @response_body = response_body @nested_error = nested_error end |
Instance Attribute Details
#nested_error ⇒ Object (readonly)
Returns the value of attribute nested_error.
10 11 12 |
# File 'lib/http_api_client/errors.rb', line 10 def nested_error @nested_error end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
10 11 12 |
# File 'lib/http_api_client/errors.rb', line 10 def response_body @response_body end |
Instance Method Details
#message ⇒ Object
19 20 21 22 23 24 |
# File 'lib/http_api_client/errors.rb', line 19 def = [@message] << nested_error. if nested_error << response_body .join(", ") end |