409 Conflict - HTTP | MDN
Status
Examples
Concurrent tasks disallowed
In the following example, we want to kick off an automation process that performs a common task in the system:
http
POST /tasks HTTP/1.1
Host: example.com
Content-Type: application/json
{
"task": "emailDogOwners",
"template": "pickup"
}
In this implementation, the server disallows two concurrent jobs from running and returns a 409, providing the client an opportunity to check if they meant to perform the action or run a different task:
http
HTTP/1.1 409 Conflict
Date: Wed, 26 Jun 2024 12:00:00 GMT
Server: Apache/2.4.1 (Unix)
Content-Type: application/json
{
"code": "AutomationConflict",
"task": "emailDogOwners",
"message": "Task locked. Cannot start a new automation since job is already running.",
"runningTaskId": "123"
}
Specifications
| Specification |
|---|
| HTTP Semantics # status.409 |