Exception: LittleGhost::Providers::Bedrock::StreamError
- Inherits:
-
LittleGhost::ProviderError
- Object
- StandardError
- Error
- LittleGhost::ProviderError
- LittleGhost::Providers::Bedrock::StreamError
- Defined in:
- lib/little_ghost/providers/bedrock.rb
Overview
Represents an error event returned inside a Bedrock stream.
Instance Attribute Summary collapse
-
#event_type ⇒ Object
readonly
Normalized Bedrock event type used to decide whether a retry is safe.
Instance Method Summary collapse
-
#initialize(message, event_type:) ⇒ StreamError
constructor
Creates a stream error for
event_type. -
#retryable? ⇒ Boolean
Indicates whether LittleGhost may retry this Bedrock event.
Constructor Details
#initialize(message, event_type:) ⇒ StreamError
Creates a stream error for event_type.
51 52 53 54 |
# File 'lib/little_ghost/providers/bedrock.rb', line 51 def initialize(, event_type:) @event_type = event_type.to_s super() end |
Instance Attribute Details
#event_type ⇒ Object (readonly)
Normalized Bedrock event type used to decide whether a retry is safe.
48 49 50 |
# File 'lib/little_ghost/providers/bedrock.rb', line 48 def event_type @event_type end |
Instance Method Details
#retryable? ⇒ Boolean
Indicates whether LittleGhost may retry this Bedrock event.
57 |
# File 'lib/little_ghost/providers/bedrock.rb', line 57 def retryable? = TRANSIENT_STREAM_ERRORS.include?(event_type) |