Exception: Feat::StreamError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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(message, code: nil)
  super(message)
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/feat/streaming.rb', line 13

def code
  @code
end