HTTP 409 Conflict — What It Means and How to Fix It

The HTTP 409 Conflict status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This typically happens when a client attempts to modify a resource that has been updated by another client, or when a unique constraint is violated.

Last updated: 2026-06-11

RECOMMENDED

Essential Reading: Designing Data-Intensive Applications

The system design bible for software engineers. Learn to build reliable, scalable, and maintainable systems.

View on Amazon →
Status Code 409
Name Conflict

Common Causes

  • Concurrent updates to the same resource (e.g., two users editing the same document simultaneously).
  • Violation of a unique constraint (e.g., trying to create a user with an email address that already exists).
  • Attempting to perform an operation on a resource that is in an invalid state for that operation (e.g., deleting a non-empty directory without specifying a recursive delete).
  • Version mismatch, often indicated by an `If-Match` header failing.

Code Examples to Handle HTTP 409

curl -I https://httpbin.org/status/409

How to Fix It

  1. Review the response body for specific details about the conflict, as the server should provide information on why the request failed.
  2. If the conflict is due to concurrent updates, retrieve the latest version of the resource, merge changes if necessary, and then re-attempt the request.
  3. If a unique constraint is violated, modify the request payload to ensure uniqueness (e.g., provide a different email address).
  4. For version conflicts, ensure the `If-Match` header (if used) contains the correct ETag for the current resource state.
💡 Example: A user attempts to save changes to a blog post, but another user has already saved their own changes to the same post in the interim. The server responds with a 409 Conflict, indicating that the user's changes cannot be applied without first resolving the conflict with the existing version.
🛠️ Developer Tip: Always provide a descriptive response body with a 409 status code, explaining the nature of the conflict to help clients resolve the issue. Consider using optimistic locking mechanisms to manage concurrent updates.

Related Status Codes

Frequently Asked Questions

What causes HTTP 409?

HTTP 409 is caused by a conflict with the current state of the resource, often due to concurrent modifications, unique constraint violations, or attempting an operation on a resource in an unsuitable state.

How do I fix HTTP 409?

To fix HTTP 409, examine the server's response for details. You'll typically need to retrieve the latest resource version, resolve any conflicts (e.g., merge changes), or modify your request to satisfy unique constraints before re-attempting the operation.