authorization_unavailable
The message text is shown in the example below.
| HTTP status | 503 |
type | service_unavailable_error |
| Retry? | Yes, with back-off after Retry-After |
| Status | In the public catalog (error-envelope.ts) |
| Extra fields | retry_after |
When it happens
The credential check could not run.
Example
{
"error": {
"type": "service_unavailable_error",
"code": "authorization_unavailable",
"message": "Could not verify this credential right now. Retry shortly.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d",
"retry_after": 5
}
}How to fix it
- Retry after
Retry-After.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 503 and err.get("code") == "authorization_unavailable":
delay = err.get("retry_after") or 2
time.sleep(delay) # then retryRelated
Was this page helpful?