Exception: ActiveAgent::Providers::Errors::ProviderError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveAgent::Providers::Errors::ProviderError
- Defined in:
- lib/active_agent/providers/errors.rb
Overview
Base class for normalized provider failures.
Direct Known Subclasses
AuthenticationFailed, ContentFiltered, ContextLengthExceeded, InvalidRequest, RateLimited, ServiceUnavailable
Instance Attribute Summary collapse
-
#provider_tag ⇒ String?
readonly
Provider tag (e.g. "Anthropic", "OpenAI::Chat").
-
#status ⇒ Integer?
readonly
HTTP status from the vendor error, when known.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, provider_tag: nil) ⇒ ProviderError
constructor
A new instance of ProviderError.
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( = nil, status: nil, provider_tag: nil) super() @status = status @provider_tag = provider_tag end |
Instance Attribute Details
#provider_tag ⇒ String? (readonly)
Returns 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 |
#status ⇒ Integer? (readonly)
Returns HTTP status from the vendor error, when known.
27 28 29 |
# File 'lib/active_agent/providers/errors.rb', line 27 def status @status end |