At One Place

HTTP 409 — Conflict

HTTP 409
Conflict
The request cannot be completed because it clashes with the current state of the resource.

What 409 actually means

The request is well formed and you are allowed to make it, but doing so right now would break something. The two classic cases are a duplicate — registering an email address that already exists — and a lost update, where two people edited the same record and the second write would silently discard the first. A 409 is a request that could succeed later or in a different order, which distinguishes it from 400 and 422.

Common causes

  • A unique constraint violated: username, email or slug already taken
  • Optimistic concurrency failure — the `If-Match` ETag no longer matches
  • Two edits to the same resource landing at once
  • Trying to delete something other records still depend on
  • A version control style conflict in a sync API

If you're just trying to view the page

  1. Reload the page to get the current version, then reapply your change
  2. If it is a signup or rename, choose a different value — something already uses the one you picked
  3. Check whether someone else edited the same item while you had it open

If it's your site

  1. Say what conflicted in the response body; "Conflict" alone forces the client to guess
  2. Use ETags with `If-Match` so conflicts are detected rather than silently overwriting
  3. Distinguish "already exists" from "version mismatch" with a machine-readable error code
  4. Where safe, make the operation idempotent so a retry succeeds instead of conflicting

Reference

Status code
409
Reason phrase
Conflict
Category
4xx — Client Error
Defined in
RFC 9110 §15.5.10

Common questions

What does HTTP 409 mean?
The request cannot be completed because it clashes with the current state of the resource. The request is well formed and you are allowed to make it, but doing so right now would break something. The two classic cases are a duplicate — registering an email address that already exists — and a lost update, where two people edited the same record and the second write would silently discard the first.
How do I fix a 409 error?
Reload the page to get the current version, then reapply your change
Is 409 a client error or a server error?
409 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked