Exception: Scanii::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Scanii::Error
- Defined in:
- lib/scanii/error.rb
Overview
Base class for all errors raised by Scanii::Client. Carries the API-supplied message plus optional X-Scanii-Request-Id and X-Scanii-Host-Id headers for support handoffs.
Per SDK Principle 3 (integration-only) the SDK does not retry on the caller’s behalf – backoff is the caller’s responsibility.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#host_id ⇒ Object
readonly
Returns the value of attribute host_id.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code: nil, request_id: nil, host_id: nil, body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status_code: nil, request_id: nil, host_id: nil, body: nil) ⇒ Error
Returns a new instance of Error.
13 14 15 16 17 18 19 |
# File 'lib/scanii/error.rb', line 13 def initialize(, status_code: nil, request_id: nil, host_id: nil, body: nil) super() @status_code = status_code @request_id = request_id @host_id = host_id @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/scanii/error.rb', line 11 def body @body end |
#host_id ⇒ Object (readonly)
Returns the value of attribute host_id.
11 12 13 |
# File 'lib/scanii/error.rb', line 11 def host_id @host_id end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
11 12 13 |
# File 'lib/scanii/error.rb', line 11 def request_id @request_id end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
11 12 13 |
# File 'lib/scanii/error.rb', line 11 def status_code @status_code end |