Exception: Agentic::Errors::LlmNetworkError

Inherits:
LlmError
  • Object
show all
Defined in:
lib/agentic/errors/llm_error.rb

Overview

Error raised when there’s a connection or network issue

Instance Attribute Summary collapse

Attributes inherited from LlmError

#context, #response

Instance Method Summary collapse

Constructor Details

#initialize(message, network_exception: nil, context: nil) ⇒ LlmNetworkError

Returns a new instance of LlmNetworkError.

Parameters:

  • message (String)

    The error message

  • network_exception (Exception) (defaults to: nil)

    The original network exception

  • context (Hash, nil) (defaults to: nil)

    Additional context about the error



94
95
96
97
# File 'lib/agentic/errors/llm_error.rb', line 94

def initialize(message, network_exception: nil, context: nil)
  super(message, context: context)
  @network_exception = network_exception
end

Instance Attribute Details

#network_exceptionException (readonly)

Returns The original network exception.

Returns:

  • (Exception)

    The original network exception



89
90
91
# File 'lib/agentic/errors/llm_error.rb', line 89

def network_exception
  @network_exception
end

Instance Method Details

#retryable?Boolean

Returns Whether this error is retryable.

Returns:

  • (Boolean)

    Whether this error is retryable



100
101
102
# File 'lib/agentic/errors/llm_error.rb', line 100

def retryable?
  true
end