HTTPfy

409 Conflict

The request conflicts with the current state of the resource.

409 at a glance

Code
409
Name
Conflict
Class
4xx Client error
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.5.10
Cacheable by default
No by default. Caches store it only when the response carries explicit freshness (Cache-Control max-age, s-maxage or Expires).

What 409 means

409 Conflict means the request is valid but cannot be applied because of the resource's current state, and the user may be able to resolve it and resubmit. Typical cases are edit conflicts, duplicate unique keys and version mismatches. The body should explain the conflict.

What typically causes a 409

  • Kubernetes API: "the object has been modified; please apply your changes to the latest version" (resourceVersion mismatch), or "AlreadyExists".
  • Elasticsearch version conflicts on concurrent updates.
  • GitHub API when a merge cannot be performed, or creating a resource that exists.
  • Creating a user or record whose unique field (email, name) already exists.
  • S3 BucketAlreadyExists or OperationAborted.

Fix it on the server

  • Explain what conflicts and how to fix it; include the current version if relevant.
  • For lost-update protection with ETags, 412 is the more precise code.

Fix it as a client or visitor

  • Re-fetch the resource, merge your change into the latest version, and retry.
  • For "already exists", treat it as success if creating was idempotent from your point of view.

Headers that go with 409

HeaderRole
ETagCurrent version to retry against.

Example response

HTTP/1.1 409 Conflict
Content-Type: application/json

{"kind": "Status", "reason": "Conflict", "message": "the object has been modified"}

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.