Exception: OpenAI::Errors::RealtimeConnectionError
- Defined in:
- lib/openai/helpers/realtime/errors.rb,
sig/openai/helpers/realtime/extensions.rbs
Overview
Raised when a Realtime WebSocket cannot be opened or used.
Instance Attribute Summary collapse
- #http_status ⇒ Integer? readonly private
- #url ⇒ URI::Generic readonly
Instance Method Summary collapse
- #cause ⇒ Exception?
- #initialize(url:, message: nil, cause: nil, http_status: nil) ⇒ Object constructor private
Constructor Details
#initialize(url:, message: nil, cause: nil, http_status: nil) ⇒ Object
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.
26 27 28 29 30 31 |
# File 'lib/openai/helpers/realtime/errors.rb', line 26 def initialize(url:, message: nil, cause: nil, http_status: nil) @url = sanitized_error_url(url) @cause = cause @http_status = http_status super( || "Realtime WebSocket connection error.") end |
Instance Attribute Details
#http_status ⇒ Integer? (readonly)
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.
15 16 17 |
# File 'lib/openai/helpers/realtime/errors.rb', line 15 def http_status @http_status end |
#url ⇒ URI::Generic (readonly)
8 9 10 |
# File 'lib/openai/helpers/realtime/errors.rb', line 8 def url @url end |
Instance Method Details
#cause ⇒ Exception?
18 |
# File 'lib/openai/helpers/realtime/errors.rb', line 18 def cause = @cause.nil? ? super : @cause |