Exception: BN::Error::Middleware::InvalidAPIRequest
- Defined in:
- lib/bn/error/middleware/invalid_api_request.rb
Overview
Raised when the JSON API response was an error.
Instance Method Summary collapse
-
#code ⇒ String
Get the code for this API error.
-
#code= ⇒ String
Set the code for this API error.
-
#reason ⇒ String
Get the reason for this API error.
-
#reason= ⇒ String
Set the reason for this API error.
- #to_s ⇒ Object
Methods included from Helpers::HasAttributes
included, #initialize, #update_attributes
Instance Method Details
#code ⇒ String
Get the code for this API error.
|
|
# File 'lib/bn/error/middleware/invalid_api_request.rb', line 8
|
#code= ⇒ String
Set the code for this API error.
18 |
# File 'lib/bn/error/middleware/invalid_api_request.rb', line 18 attribute(:code) { |value| value.to_s } |
#reason ⇒ String
Get the reason for this API error.
|
|
# File 'lib/bn/error/middleware/invalid_api_request.rb', line 20
|
#reason= ⇒ String
Set the reason for this API error.
30 |
# File 'lib/bn/error/middleware/invalid_api_request.rb', line 30 attribute(:reason) { |value| value.to_s } |
#to_s ⇒ Object
32 33 34 |
# File 'lib/bn/error/middleware/invalid_api_request.rb', line 32 def to_s "Invalid API request: #{@reason}." end |