- Home
- Tools
- Developer Tools
- HTTP Status Codes
- 409 Conflict
409 Conflict
The request clashes with the current state of the resource: someone else changed it first, or what you want to create is already there.
- Class
- 4xx Client error. The request is the problem: a wrong address, missing credentials, data the server can't accept.
- Defined in
- RFC 9110
What causes it
For a change that can't be combined with what the server holds now. Two people edit the same record and the second save is based on an old version. A user name is taken. A folder isn't empty and so can't be deleted. An order was already cancelled.
What to do about it
Fetch the current state, sort out the difference and send the request again. An API should say in the body what the conflict is.
If the request was a second attempt at something that did go through the first time, the 409 tells you so. Check before you create a duplicate.
If you build the API: 409 is for conflicts the user can resolve. Data that breaks a rule on its own is a 422.
Not to be confused with
| 412 Precondition Failed | The conflict was caught by a condition the client sent along, such as If-Match. |
|---|---|
| 422 Unprocessable Content | The data is invalid in itself, whatever the state of the resource. |
| 423 Locked | The resource is locked. |
All codes are on the list of HTTP status codes, which can be searched by number and by word.
Other 4xx codes
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 424 Failed Dependency
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons