Nous.Errors.ProviderError exception (nous v0.16.0)

View Source

Error from an LLM provider.

Raised when a provider API call fails.

Fields

  • :provider — provider id atom (e.g., :vertex_ai)
  • :status_code — HTTP status when applicable
  • :retry_after_ms — server-suggested backoff in milliseconds, parsed from the response body (google.rpc.RetryInfo) or Retry-After header. nil when the failure is not retry-hinted (e.g. daily quota exhaustion deliberately omits RetryInfo per Google's spec).
  • :details — raw error payload from the HTTP layer

Summary

Types

t()

@type t() :: %Nous.Errors.ProviderError{
  __exception__: true,
  details: any(),
  message: String.t(),
  provider: atom() | nil,
  retry_after_ms: pos_integer() | nil,
  status_code: integer() | nil
}