409 Conflict HTTP Status Code

Description

The HTTP status code 409 indicates a "Conflict". It signifies that the request could not be processed due to a conflict in the current state of the resource. This response is typically returned when the request conflicts with the current state of the server, such as attempting to upload a file that already exists or submitting a form with outdated information that conflicts with newer data stored on the server.

The 409 status code is particularly useful in scenarios where what is being requested involves changing a resource that has been updated since the user last accessed it, potentially leading to a conflict. For example, if two users are editing the same resource simultaneously and one tries to save changes after the other, the server may return a 409 response to indicate that the resource has been modified in the meantime.

In response to a 409 Conflict, the server may include information in the body of the response that explains the reason for the conflict, allowing the client to understand what went wrong and possibly how to resolve the conflict. This could involve prompting the user to make a decision, merging changes, or re-submitting the request with updated information.

Status

HTTP
409 Conflict

Common Causes

Here are some typical causes for a 409 response:

  1. Version Conflict: When version control is used and the client is attempting to modify a resource without having the latest version. This often happens in systems where resources are versioned and the client's version is outdated due to another recent update by a different client.

  2. Concurrent Modifications: If two or more clients attempt to update the same resource simultaneously, the server might only accept one and reject the others with a 409 error to prevent data inconsistency.

  3. Duplicate Resource Creation: Attempting to create a resource that already exists. For instance, trying to create a user with a username that is already taken.

  4. Invalid Request State: The request may be well-formed but cannot be processed in its current state. For example, attempting to delete a directory in a file system that is not empty.

  5. Conflict in Business Logic: The request might conflict with the server's rules or business logic. For example, booking a flight seat that has already been booked by another user.

  6. Constraints Violation: The request could violate some database or application constraints. This might include violating foreign keys in a database or attempting actions not allowed by the application's logic.

To resolve a 409 conflict, the client may need to obtain fresh data from the server, reconcile differences, and resend the request. The server's response might include details about the conflict and how to resolve it, often in the response body or through specific headers.

Browser Support

The following table will show you the current browser support for the 409 Conflict HTTP status code.

Desktop
Edge Chrome Firefox Opera Safari
YesYesYesYesYes
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
YesYesYesYesYesYes

Last updated by CSSPortal on: 1st April 2024