Exception: Formable::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Formable::Error
- Defined in:
- lib/formable/error.rb
Overview
Raised for any non-2xx response from the Formable API.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status:, body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status:, body: nil) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 |
# File 'lib/formable/error.rb', line 8 def initialize(, status:, body: nil) super() @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/formable/error.rb', line 6 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/formable/error.rb', line 6 def status @status end |