Exception: Vericred::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Vericred::Error
- Defined in:
- lib/vericred/errors.rb
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
5 6 7 |
# File 'lib/vericred/errors.rb', line 5 def initialize(response) @response = response end |
Instance Method Details
#errors ⇒ Object
9 10 11 |
# File 'lib/vericred/errors.rb', line 9 def errors OpenStruct.new(JSON.parse(response.content).try(:[], 'errors') || {}) end |
#status ⇒ Object
13 14 15 |
# File 'lib/vericred/errors.rb', line 13 def status response.status end |