Exception: OpenAI::Errors::PollingTimeoutError
- Inherits:
-
PollingError
- Object
- StandardError
- Error
- PollingError
- OpenAI::Errors::PollingTimeoutError
- Defined in:
- lib/openai/errors.rb,
sig/openai/errors.rbs
Overview
Raised when a polling helper exceeds its overall timeout.
Instance Attribute Summary collapse
-
#operation ⇒ String
readonly
A human-readable description of the operation being polled.
-
#resource ⇒ Object?
readonly
The last resource returned by the API before the timeout, or
nilwhen the deadline elapsed before the first response. -
#timeout ⇒ Float
readonly
The configured overall polling timeout in seconds.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(operation:, timeout:, resource:) ⇒ PollingTimeoutError
constructor
private
A new instance of PollingTimeoutError.
Constructor Details
#initialize(operation:, timeout:, resource:) ⇒ PollingTimeoutError
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 PollingTimeoutError.
41 42 43 44 45 46 |
# File 'lib/openai/errors.rb', line 41 def initialize(operation:, timeout:, resource:) @operation = operation @timeout = timeout @resource = resource super("Timed out waiting for #{operation} after #{timeout} seconds.") end |
Instance Attribute Details
#operation ⇒ String (readonly)
A human-readable description of the operation being polled.
34 35 36 |
# File 'lib/openai/errors.rb', line 34 def operation @operation end |
#resource ⇒ Object? (readonly)
The last resource returned by the API before the timeout, or nil when
the deadline elapsed before the first response.
24 25 26 |
# File 'lib/openai/errors.rb', line 24 def resource @resource end |
#timeout ⇒ Float (readonly)
The configured overall polling timeout in seconds.
29 30 31 |
# File 'lib/openai/errors.rb', line 29 def timeout @timeout end |