Exception: Tina4::APIStreamError
- Inherits:
-
StandardError
- Object
- StandardError
- Tina4::APIStreamError
- Defined in:
- lib/tina4/api.rb
Overview
Raised when a streaming request (stream_bytes / stream_lines / stream_sse)
opens successfully but the HTTP status is not 2xx. The buffered execute
path folds an error status into an APIResponse; a streaming caller has no
response object to inspect, so the error is raised at the moment the status
is known -- before any bytes are yielded (the pre-stream error contract of
ADR-0060). Carries the status code for the caller to switch on.
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status = nil) ⇒ APIStreamError
constructor
A new instance of APIStreamError.
Constructor Details
#initialize(message, status = nil) ⇒ APIStreamError
Returns a new instance of APIStreamError.
800 801 802 803 |
# File 'lib/tina4/api.rb', line 800 def initialize(, status = nil) super() @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
798 799 800 |
# File 'lib/tina4/api.rb', line 798 def status @status end |