Exception: OpenAI::Errors::WebSocketConnectionError Private
- Defined in:
- lib/openai/helpers/websocket/errors.rb,
sig/openai/helpers/websocket.rbs
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Base class for SDK WebSocket connection failures.
Direct Known Subclasses
Instance Attribute Summary collapse
- #http_status ⇒ Integer? readonly private
- #url ⇒ URI::Generic readonly private
Instance Method Summary collapse
- #cause ⇒ Exception? private
-
#initialize(url:, message: nil, cause: nil, http_status: nil) ⇒ WebSocketConnectionError
constructor
private
A new instance of WebSocketConnectionError.
Constructor Details
#initialize(url:, message: nil, cause: nil, http_status: nil) ⇒ WebSocketConnectionError
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 WebSocketConnectionError.
14 15 16 17 18 19 |
# File 'lib/openai/helpers/websocket/errors.rb', line 14 def initialize(url:, message: nil, cause: nil, http_status: nil) @url = sanitized_error_url(url) @cause = cause @http_status = http_status super( || ) 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.
9 10 11 |
# File 'lib/openai/helpers/websocket/errors.rb', line 9 def http_status @http_status end |
#url ⇒ URI::Generic (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.
9 10 11 |
# File 'lib/openai/helpers/websocket/errors.rb', line 9 def url @url end |
Instance Method Details
#cause ⇒ Exception?
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.
11 |
# File 'lib/openai/helpers/websocket/errors.rb', line 11 def cause = @cause.nil? ? super : @cause |