Exception: RubyLLM::Agents::Reliability::TotalTimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_llm/agents/infrastructure/reliability.rb

Overview

Raised when the total timeout for all retry/fallback attempts is exceeded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timeout_seconds, elapsed_seconds) ⇒ TotalTimeoutError

Returns a new instance of TotalTimeoutError.

Parameters:

  • timeout_seconds (Integer)

    The configured total timeout

  • elapsed_seconds (Float)

    The elapsed time when timeout occurred



80
81
82
83
84
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 80

def initialize(timeout_seconds, elapsed_seconds)
  @timeout_seconds = timeout_seconds
  @elapsed_seconds = elapsed_seconds
  super("Total timeout of #{timeout_seconds}s exceeded (elapsed: #{elapsed_seconds.round(2)}s)")
end

Instance Attribute Details

#elapsed_secondsObject (readonly)



76
77
78
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 76

def elapsed_seconds
  @elapsed_seconds
end

#timeout_secondsObject (readonly)



76
77
78
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 76

def timeout_seconds
  @timeout_seconds
end