Skip to content

NetworkError

Network-level failure (DNS, TCP, TLS). Retryable.

new NetworkError(provider, cause?): NetworkError

string

Error

NetworkError

ModelError.constructor

readonly optional cause?: Error

Original error that caused this one, if any.

ModelError.cause


code: string

Machine-readable error code (e.g., “ABORT”, “RATE_LIMIT”, “TOOL_DENIED”).

ModelError.code


readonly provider: string

Provider name (e.g., “anthropic”, “openai”).

ModelError.provider


readonly retryable: boolean

Whether this error can be retried by retry middleware.

ModelError.retryable


readonly optional statusCode?: number

HTTP status code from the provider API, if available.

ModelError.statusCode