Exception: OpenAI::Errors::RealtimeProtocolError
- Defined in:
- lib/openai/helpers/realtime/errors.rb,
sig/openai/helpers/realtime/extensions.rbs
Overview
Raised when a Realtime WebSocket message cannot be parsed as a typed event.
Instance Attribute Summary collapse
- #data ⇒ String readonly
Instance Method Summary collapse
- #cause ⇒ StandardError?
-
#initialize(data:, cause: nil) ⇒ RealtimeProtocolError
constructor
private
A new instance of RealtimeProtocolError.
Constructor Details
#initialize(data:, cause: nil) ⇒ RealtimeProtocolError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RealtimeProtocolError.
66 67 68 69 70 |
# File 'lib/openai/helpers/realtime/errors.rb', line 66 def initialize(data:, cause: nil) @data = data @cause = cause super("Invalid Realtime WebSocket event.") end |
Instance Attribute Details
#data ⇒ String (readonly)
57 58 59 |
# File 'lib/openai/helpers/realtime/errors.rb', line 57 def data @data end |
Instance Method Details
#cause ⇒ StandardError?
60 |
# File 'lib/openai/helpers/realtime/errors.rb', line 60 def cause = @cause.nil? ? super : @cause |