HTTPError.net

The fastest way to diagnose, understand, and fix any HTTP status code

409 Conflict

Fault: Client
TL;DR

Request cannot be completed due to conflict with resource state.

The request conflicts with the current state of the server.

What HTTP 409 Conflict Means

The request conflicts with the current state of the server.

Request cannot be completed due to conflict with resource state.

Common Causes

How to Fix It (For Visitors)

How to Fix It (For Developers/Admins)

Returning a 409 Conflict (Code Examples)

If you build APIs or web apps, here is how to send an HTTP 409 response and how to test for it:

Node.js (Express)

app.get('/resource', (req, res) => {
  res.status(409).json({ error: 'Conflict' });
});

Python (Flask)

@app.route('/resource')
def resource():
    return jsonify(error='Conflict'), 409

PHP

<?php
http_response_code(409);
header('Content-Type: application/json');
echo json_encode(['error' => 'Conflict']);

Check the status with curl

curl -I https://example.com/resource
# Look for: HTTP/1.1 409 Conflict

Frequently Asked Questions

What does HTTP 409 Conflict mean?

Request cannot be completed due to conflict with resource state. In short: The request conflicts with the current state of the server.

Is 409 Conflict a client or server error?

409 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.

How do I fix a 409 Conflict error?

Implement optimistic locking. Use ETags for version control. Handle concurrent updates.

Official Specification

The 409 Conflict status code is defined in RFC 7231 Section 6.5.8.

View the IANA HTTP Status Code Registry →