resource_conflict

The message text is shown in the example below.

⚠️
Preview — this feature is being built; the design below is the spec. Not in the public error catalog: planned for preview endpoints.
HTTP status409
typeconflict_error
Retry?No, not unchanged
StatusPreview
Extra fieldsnone

When it happens

For example, updating an archived resource or deleting one that is in use.

Example

{
  "error": {
    "type": "conflict_error",
    "code": "resource_conflict",
    "message": "The change clashes with how the resource is right now.",
    "param": null,
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

How to fix it

  • Read the resource, then decide; the message names the blocking state.

Detect it in code

err = resp.json().get("error", {})
if resp.status_code == 409 and err.get("code") == "resource_conflict":
    log.warning("%s (%s)", err["message"], err["request_id"])  # fix the request; do not retry unchanged
Was this page helpful?