Exception: Passfort::Errors::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Passfort::Errors::APIError
- Defined in:
- lib/passfort/errors/api_error.rb
Overview
Represents any response from the API which is not a 200 OK
Direct Known Subclasses
BadGatewayError, ChargeableLimitReachedError, InvalidAPIKeyError, InvalidInputDataError, RequestError, TimeoutError, UnknownApiError, UnparseableResponseError
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(msg, errors = [], response = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(msg, errors = [], response = nil) ⇒ APIError
Returns a new instance of APIError.
9 10 11 12 13 |
# File 'lib/passfort/errors/api_error.rb', line 9 def initialize(msg, errors = [], response = nil) super(msg) @response = response @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/passfort/errors/api_error.rb', line 7 def errors @errors end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/passfort/errors/api_error.rb', line 7 def response @response end |