Docs / Errors

IDEMPOTENCY_REQUEST_UNSETTLED

409Idempotent request unsettled

Why it happens

A request under this Idempotency-Key was received before, but it has no answer to replay: it may still be running, or it failed after it took effect. For POST /v1/masjid/notifications, the notification may already have been sent to your followers. Nothing was done this time.

What to do

  • Do not send the request again under a new key: that could send it twice.
  • Wait a few seconds, then retry with the same key and the same body: once the first request has answered, the retry gets its answer.
  • If it keeps answering this, check what the first request did before you act, for a notification with GET /v1/masjid/notifications. A key is kept 24 hours.

Example response

http
HTTP/1.1 409
{
  "type": "https://hub.masjidbox.com/docs/errors/IDEMPOTENCY_REQUEST_UNSETTLED",
  "title": "Idempotent request unsettled",
  "status": 409,
  "detail": "The first request under this Idempotency-Key has no answer to replay: it may still be running, or may already have taken effect. Do not resend it under a new key.",
  "instance": "/v1/masjids/msj_abc123defg",
  "code": "IDEMPOTENCY_REQUEST_UNSETTLED",
  "requestId": "req_8f14e45fceea167a5a36dedd4bea2543",
  "requestLogUrl": "https://hub.masjidbox.com/console/logs/req_8f14e45fceea167a5a36dedd4bea2543"
}