conflict
The message text is shown in the example below.
| HTTP status | 409 |
type | conflict_error |
| Retry? | Yes, with back-off |
| Status | In the public catalog (error-envelope.ts) |
| Extra fields | none |
When it happens
The request clashed with how a resource stood at that moment.
Example
{
"error": {
"type": "conflict_error",
"code": "conflict",
"message": "The request conflicts with the current state. Retry shortly.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
}
}How to fix it
- Retry shortly; if it repeats, read the resource and resolve the clash.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 409 and err.get("code") == "conflict":
delay = err.get("retry_after") or 2
time.sleep(delay) # then retryRelated
Was this page helpful?