Exception: Node::Red::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Node::Red::ApiError
- Defined in:
- lib/node/red/errors.rb
Overview
Base error class for Node-RED API errors that keeps rich context
Direct Known Subclasses
AuthenticationError, BadRequestError, ConflictError, NotFoundError, ServerError, UnexpectedResponseError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status:, code: nil, details: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status:, code: nil, details: nil) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 13 14 |
# File 'lib/node/red/errors.rb', line 9 def initialize(, status:, code: nil, details: nil) super() @status = status @code = code @details = details end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/node/red/errors.rb', line 7 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
7 8 9 |
# File 'lib/node/red/errors.rb', line 7 def details @details end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/node/red/errors.rb', line 7 def status @status end |