internal_error

The message text is shown in the example below.

HTTP status500
typeapi_error
Retry?Yes, with back-off
StatusIn the public catalog (error-envelope.ts)
Extra fieldsnone

When it happens

An unexpected failure inside Syntic.

Example

{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "An internal error occurred. Retry shortly; contact support with the request id if it persists.",
    "param": null,
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

How to fix it

  • Retry with exponential back-off.
  • If it repeats, send the request_id to support.

Detect it in code

err = resp.json().get("error", {})
if resp.status_code == 500 and err.get("code") == "internal_error":
    delay = err.get("retry_after") or 2
    time.sleep(delay)  # then retry
Was this page helpful?