Exception: ActiveAgent::Providers::Errors::ProviderError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_agent/providers/errors.rb

Overview

Base class for normalized provider failures.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, provider_tag: nil) ⇒ ProviderError

Returns a new instance of ProviderError.



32
33
34
35
36
# File 'lib/active_agent/providers/errors.rb', line 32

def initialize(message = nil, status: nil, provider_tag: nil)
  super(message)
  @status = status
  @provider_tag = provider_tag
end

Instance Attribute Details

#provider_tagString? (readonly)

Returns provider tag (e.g. "Anthropic", "OpenAI::Chat").

Returns:

  • (String, nil)

    provider tag (e.g. "Anthropic", "OpenAI::Chat")



30
31
32
# File 'lib/active_agent/providers/errors.rb', line 30

def provider_tag
  @provider_tag
end

#statusInteger? (readonly)

Returns HTTP status from the vendor error, when known.

Returns:

  • (Integer, nil)

    HTTP status from the vendor error, when known



27
28
29
# File 'lib/active_agent/providers/errors.rb', line 27

def status
  @status
end