Exception: CSTM2::Error
- Inherits:
-
StandardError
- Object
- StandardError
- CSTM2::Error
- Defined in:
- lib/cstm2.rb
Overview
Raised for any non-2xx CSTM-2 API response.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, code = 'api_error', status = 500) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, code = 'api_error', status = 500) ⇒ Error
Returns a new instance of Error.
21 22 23 24 25 |
# File 'lib/cstm2.rb', line 21 def initialize(, code = 'api_error', status = 500) super() @code = code @status = status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
19 20 21 |
# File 'lib/cstm2.rb', line 19 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
19 20 21 |
# File 'lib/cstm2.rb', line 19 def status @status end |