class RubyLLM::ConnectionError
Raised when a request never gets an answer from the provider: the connection is refused or drops, TLS fails, or the request times out. RubyLLM retries it first, following Configuration#max_retries. The original Faraday error is its cause.
rescue RubyLLM::ConnectionError => e retry_later if e.timeout?
Public Instance Methods
Source
# File lib/ruby_llm/error.rb, line 319 def timeout? return true if cause.is_a?(Faraday::TimeoutError) cause.respond_to?(:wrapped_exception) && cause.wrapped_exception.is_a?(Timeout::Error) end
Returns whether the request timed out, including while opening the connection, rather than failing to connect.