Documentation
¶
Overview ¶
Package providererror defines provider-agnostic provider failure metadata carried through ACP and ADK runtime layers.
Index ¶
Constants ¶
View Source
const ( // WireKey is the ACP metadata/data key for provider errors. WireKey = "provider_error" // ADKMetadataKey is the ADK event metadata key used after ACP mapping. ADKMetadataKey = "acp_provider_error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderError ¶
type ProviderError struct {
Kind Kind `json:"kind"`
Message string `json:"message,omitempty"`
RequestID string `json:"request_id,omitempty"`
Provider string `json:"provider,omitempty"`
Retryable *bool `json:"retryable,omitempty"`
}
ProviderError is a provider-agnostic classification of a provider-side failure. It intentionally mirrors the ACP wire shape without branding.
func FromADKMetadata ¶
func FromADKMetadata(meta map[string]any) (*ProviderError, bool)
FromADKMetadata extracts a provider error already mapped to ADK metadata.
func FromMetadata ¶
func FromMetadata(meta map[string]any) (*ProviderError, bool)
FromMetadata extracts provider_error from ACP metadata.
func FromWireData ¶
func FromWireData(data any) (*ProviderError, bool)
FromWireData extracts provider_error from JSON-RPC error data or ACP _meta.
func FromWireValue ¶
func FromWireValue(value any) (*ProviderError, bool)
FromWireValue parses the provider_error object itself.
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
Click to show internal directories.
Click to hide internal directories.