idempotency_in_progress
A request with this Idempotency-Key is currently being processed. Yours was not, because
running both would risk sending twice.
Status: 409, with Retry-After: 1.
{
"status": 409,
"type": "idempotency_in_progress",
"message": "A request with this Idempotency-Key is already in progress",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/idempotency_in_progress"
}
Why you got this
- A retry fired while the original request was still running, usually after a client timeout shorter than the work took.
- Two workers picked up the same queue message and both submitted it.
- A user double-clicked and both requests carried the same key.
All three are the situation idempotency exists for. This response is the protection working.
How to fix it
Wait the second and send the identical request again. Once the first request finishes you
will get its result, with Idempotent-Replayed: true, and exactly one email will have been
sent.
If you see this often, your client timeout is probably shorter than the request naturally takes. Raising it will reduce the number of retries that race.
Is it safe to retry
Yes, and you should. Retry the identical request with the same key after Retry-After.
Changing the key would defeat the protection and send a second email.