HTTP response status code 409 Conflict is a client error that is returned by the server to indicate that the request can not be satisfied because the current state is incompatible with what is required. The response from the server may contain information in the message body that the client can use to resolve the conflict.
When the 409 Conflict error message is received, it means that the request is valid, but cannot be completed due to some kind of mismatch. For example, if the client is replying to a post that has since been deleted, then the target resource is no longer in a compatible state and the server may return this status.
The client is expected to examine the message body to determine how to resolve the conflict. In the case of replying to the deleted post, the client may opt to abandon the request. Alternatively, it can undelete the former thread or instead, create a new thread with the former text quoted. This action will be entirely the responsibility of the client, following any requirements or policies put in place by the server.
Search engines like Google will not index a URL with 409 Conflict response status, and consequently, URLs that have been indexed in the past but are now returning this HTTP status code will be removed from the search results.
In the example, the client attempts to tag an existing blog post with “ID = 111” with a “like”. The server responds to say that the post has been frozen and can no longer accept replies or tags.
POST /blog/update?postid=111&flag=like HTTP/1.1 Host: www.example.ai
HTTP/1.1 409 Conflict Content-Type: text/html Content-Length: 288 <html> <head> <title>Blog Entry Frozen</title> </head> <body> <p>This post has been marked read-only. To post a reply or tag it, please change the status and try again.</p> </body> </html>
Apache HttpComponents Core
The 409 Conflict status code is a client error that the server sends to indicate that the resource is not in a state that is compatible with the request. The response may contain information sufficient to rectify the problem and allow the request to be resubmitted.