Exception: ExperianConsumerView::Errors::ApiHttpError
- Inherits:
-
StandardError
- Object
- StandardError
- ExperianConsumerView::Errors::ApiHttpError
- Defined in:
- lib/experian_consumer_view/errors.rb
Overview
Base helper class for errors caused due to unexpected HTTP responses
Direct Known Subclasses
ApiBadCredentialsError, ApiEndpointNotFoundError, ApiHttpVersionNotSupportedError, ApiIncorrectJsonError, ApiServerError, ApiServerRefreshingError, ApiUnhandledHttpError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(code, response) ⇒ ApiHttpError
constructor
A new instance of ApiHttpError.
- #message ⇒ Object
Constructor Details
#initialize(code, response) ⇒ ApiHttpError
Returns a new instance of ApiHttpError.
9 10 11 12 13 |
# File 'lib/experian_consumer_view/errors.rb', line 9 def initialize(code, response) super() @code = code @response = response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/experian_consumer_view/errors.rb', line 7 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/experian_consumer_view/errors.rb', line 7 def response @response end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/experian_consumer_view/errors.rb', line 15 def "HTTP code [#{@code}], response text [#{@response}]" end |