What 409 means
The request can’t be done because it clashes with the current state of the resource. The response should explain the conflict so the user can resolve it.
When servers send it
Edit conflicts, creating something that already exists, or changing something into a state it can’t move to.
Common causes
- Signing up with an email address that’s already registered.
- Two people editing the same record, with the second save rejected.
- A Git-style version mismatch when uploading.
- Deleting something that other records still depend on.
How to fix it as a developer
- Return details in the body (which field, what conflicts) so the client can show a useful message.
- For “someone else edited this”, consider ETags with
If-Match, which give 412 Precondition Failed. - Use idempotency keys on create requests so retries don’t cause 409s or duplicates.
How to fix it as a visitor
- Refresh the page to load the latest version, then make your change again.
- If it says something already exists (an account, a name), choose a different one or sign in.
Related codes
- 412 Precondition Failed: A condition in the request headers, such as If-Match, wasn’t true, so nothing was changed.
- 422 Unprocessable Content: The request is well formed, but the data in it doesn’t make sense, such as failing validation.
- 428 Precondition Required: The server wants the request to be conditional (with If-Match) so updates can’t overwrite each other.
- 400 Bad Request: The server can’t or won’t handle the request because something in it is malformed.
Where it’s defined
409 Conflict is defined in RFC 9110, section 15.5.10. It’s a 4xx code, the client error class: something is wrong with the request, so sending it again unchanged won’t help.
Other 4xx codes
400 Bad Request · 401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 408 Request Timeout · 410 Gone · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 418 I’m a teapot · 422 Unprocessable Content · 429 Too Many Requests · 431 Request Header Fields Too Large · 451 Unavailable For Legal Reasons · 499 Client Closed Request
Or search them all in the HTTP status code list.
Questions people ask
What does HTTP 409 Conflict mean?
Should I use 409 or 422 for a duplicate email address?
What’s the difference between 409 and 412?
If-Match) that turned out false. 409 is the general case.