Exception: OpenAI::Errors::RealtimeProtocolError
- Inherits:
-
WebSocketProtocolError
- Object
- StandardError
- Error
- WebSocketProtocolError
- 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.
60 61 62 63 64 |
# File 'lib/openai/helpers/realtime/errors.rb', line 60 def initialize(data:, cause: nil) @data = data @cause = cause super("Invalid Realtime WebSocket event.") end |
Instance Attribute Details
#data ⇒ String (readonly)
51 52 53 |
# File 'lib/openai/helpers/realtime/errors.rb', line 51 def data @data end |
Instance Method Details
#cause ⇒ StandardError?
54 |
# File 'lib/openai/helpers/realtime/errors.rb', line 54 def cause = @cause.nil? ? super : @cause |