Exception: Sqwiggle::Api::Errors::BadRequestError
- Inherits:
-
StandardError
- Object
- StandardError
- Sqwiggle::Api::Errors::BadRequestError
- Defined in:
- lib/sqwiggle/api/errors/bad_request_error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(response) ⇒ BadRequestError
constructor
A new instance of BadRequestError.
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ BadRequestError
Returns a new instance of BadRequestError.
8 9 10 |
# File 'lib/sqwiggle/api/errors/bad_request_error.rb', line 8 def initialize(response) @body = JSON.parse response.body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/sqwiggle/api/errors/bad_request_error.rb', line 6 def body @body end |
Instance Method Details
#message ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/sqwiggle/api/errors/bad_request_error.rb', line 12 def { type:body['type'], param:body['param'], message:body['message'] }.inspect end |