I have a single end point of a web service where you can queue items for processing by a bot. The items are queued, so it can take quite a while before they are actually processed.
If someone make a request, one of the following three options can occur:
- The item is not yet in queue and will be queued. The end point will return 202 Accepted.
- The items has already been queued, but not yet processed. This is what I need a status code for.
- The item has been processed and data is available. Either 200 OK + data or 404 Not found will be returned.
I have looked in RFC7231 for ideas, but I don't really see anything for item's already in queue (step 2).
By name alone, the one called 208 Already reported sounds good. But it appears to be specific to WebDAV, so that doesn't sound like a good idea to use.
Obviously 409 Conflict sounds like a good option, but that would require another end point to handle returning the answer, once the item is processed. I might have trouble getting the people who designed the process to accept this.
What status code tells the client that their request is already being processed?