Exception: Rentlinx::BadRequest
- Inherits:
-
HTTPError
- Object
- StandardError
- RentlinxError
- HTTPError
- Rentlinx::BadRequest
- Defined in:
- lib/rentlinx/errors.rb
Overview
Thrown when error code 400 (bad request) is received
Instance Attribute Summary
Attributes inherited from HTTPError
Instance Method Summary collapse
-
#initialize(response) ⇒ BadRequest
constructor
A new instance of BadRequest.
Constructor Details
#initialize(response) ⇒ BadRequest
Returns a new instance of BadRequest.
57 58 59 60 61 62 63 64 65 |
# File 'lib/rentlinx/errors.rb', line 57 def initialize(response) = 'The request sent to the server was invalid.' begin = JSON.parse(response.body)['details'] || rescue JSON::ParserError = end super(response, ) end |