AI Help

How do I tell whether an AI API failure is temporary or needs a code change?

Classify the provider's status and error code before retrying. Temporary availability failures, invalid inputs and quota problems require different handling.

Steps to follow

  1. Capture the error type, status, request ID and relevant documented details.
  2. Use bounded backoff for eligible transient errors. Fix invalid parameters, authentication, access or exhausted quota through the appropriate configuration path.
  3. Route unresolved failures to review and preserve the job for safe recovery. Reconcile ambiguous completed work before repeating it.

Example in practice

Illustrative example. An invalid model identifier needs a configuration correction, while a temporary server error may qualify for a limited retry.

Related AI help

Official guidance

OpenAI documentation