Exception: Melaya::MelayaError
- Inherits:
-
StandardError
- Object
- StandardError
- Melaya::MelayaError
- Defined in:
- lib/melaya/errors.rb
Overview
Raised for non-2xx REST responses or ok:false envelopes.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: 0, code: nil, body: nil) ⇒ MelayaError
constructor
A new instance of MelayaError.
Constructor Details
#initialize(message, status: 0, code: nil, body: nil) ⇒ MelayaError
Returns a new instance of MelayaError.
8 9 10 11 12 13 |
# File 'lib/melaya/errors.rb', line 8 def initialize(, status: 0, code: nil, body: nil) super() @status = status @code = code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/melaya/errors.rb', line 6 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/melaya/errors.rb', line 6 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/melaya/errors.rb', line 6 def status @status end |