Exception: DIDKit::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- DIDKit::APIError
- Defined in:
- lib/didkit/errors.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
8 9 10 11 |
# File 'lib/didkit/errors.rb', line 8 def initialize(response) @response = response super("APIError: #{response}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/didkit/errors.rb', line 6 def response @response end |
Instance Method Details
#body ⇒ Object
17 18 19 |
# File 'lib/didkit/errors.rb', line 17 def body response.body end |
#status ⇒ Object
13 14 15 |
# File 'lib/didkit/errors.rb', line 13 def status response.code.to_i end |