Skip to content

isRetryableError

isRetryableError(error): boolean

Defined in: core/retry.ts:154

Determines if an error is retryable based on common LLM API error patterns.

Retryable errors include:

  • Rate limits (429)
  • Server errors (500, 502, 503, 504)
  • Timeouts and connection errors
  • Provider-specific transient errors

Non-retryable errors include:

  • Authentication errors (401, 403)
  • Bad request errors (400)
  • Not found errors (404)
  • Content policy violations

Error

The error to classify

boolean

true if the error is retryable