Exception: Feat::StreamError
- Inherits:
-
StandardError
- Object
- StandardError
- Feat::StreamError
- Defined in:
- lib/feat/streaming.rb
Overview
Raised when the stream endpoint answers with a non-200 status. code carries the HTTP status so the run loop can tell terminal auth failures (401 invalid/revoked/expired key, 403 origin not allowed) apart from retryable ones (429 rate limit, 5xx).
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(message, code: nil) ⇒ StreamError
constructor
A new instance of StreamError.
Constructor Details
#initialize(message, code: nil) ⇒ StreamError
Returns a new instance of StreamError.
15 16 17 18 |
# File 'lib/feat/streaming.rb', line 15 def initialize(, code: nil) super() @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/feat/streaming.rb', line 13 def code @code end |