Skip to content

Errors ​

Last updated 

Error responses are JSON:

json
{
  "kind": "queue_not_found",
  "message": "queue orders does not exist",
  "details": {"queue": "orders"}
}

kind is present where the status alone is ambiguous; details carries the facts the message states, as fields fixed per kind, and is absent for kinds that have none. Match on the status, kind and details; the message text is for humans and is not part of the contract. A fact never lives only in message: what a client can act on is a field, in the body or in a header. A fact HTTP has a header for is that header and is not repeated in the body: the wait on a 429 is Retry-After, whole seconds.

A status without a kind means what HTTP says: 503 the spool is momentarily unavailable – retry.

Kinds ​

Where a kind carries details, its shape follows the meaning – the shape, not a sample: values are the wire types.

KindStatusRetryMeaning
invalid_token400Never.The token – lease or handle – is malformed: a bug or tampering.
dedup_disabled400No – set dedupWindowSeconds or drop the key.The send carries a dedup key but the queue has no dedup window.
unknown_header400No – fix the request.A Spooler-* request header the operation does not define – likely meant for another endpoint.
jsonc
{
  // The refused header's name.
  header: string,
}
unauthenticated401No – fix the credentials.The API key is missing, malformed or not recognized.
account_suspended402After settling payment.The account is suspended for an unpaid balance; paying lifts it.
account_blocked403No – contact support.The account is on an abuse hold; paying does not lift it.
retention_limit403No.The requested retention exceeds the plan's limit.
jsonc
{
  // The plan's retention limit.
  maxSeconds: integer,
}
queue_limit403No – delete unused queues.The plan's queue limit is reached.
jsonc
{
  // Queues the plan allows on the spool.
  max: integer,
}
queue_not_found404No.The queue does not exist. A verdict, not lag.
jsonc
{
  // The queue name that was addressed.
  queue: string,
}
spool_not_found404No.No spool of that name on the account. A verdict, like queue_not_found; a spool just created is visible within seconds.
queue_exists409No.A create names a queue that already exists.
queue_creating409Yes; the retry answers queue_exists, or creates the queue if the earlier create failed.Another create of the name has not completed; until it does, the queue does not exist and reads answer queue_not_found.
queue_deleting409A create: yes, once the deletion completes. Otherwise no.The queue refuses the operation while its deletion completes; until then it holds its name, so a create under the name is refused too.
queue_busy409Yes.Another change to the queue, an update or a delete, has not completed.
not_failed409No – a verdict; the view was fresh.Recover was given a current handle to a message that is not failed.
dedup_in_flight409Yes, after it settles.A send with the same dedup key has not settled yet.
dedup_claimed409No – ack explicitly if folding into it was the intent.An ack-and-send's dedup key is held by another message; nothing was acked.
jsonc
{
  // The message holding the dedup key.
  id: string,
}
stale_token410A lease: receive again. A handle: list again.The token verified but no longer names anything: the lease expired, was settled, or predates a primary change; the message a handle named moved on.
queue_replaced412No – a verdict; read the queue again for its current uid.An update or delete given a uid found another queue under the name, created again since. Nothing was changed.
jsonc
{
  // The uid of the queue now under the name.
  //
  // Length:  1–128 chars
  // Pattern: ^[A-Za-z0-9_-]+$
  uid: string,
}
payload_too_large413No.The message exceeds the plan's size limit (see limits); the connection is closed.
rate_limited429After the Retry-After seconds.The per-account request rate cap is exceeded (see request rate).
operation_unconfirmed500A send: only on a queue with a dedup window, carrying the same key (see deduplication).The write was accepted but its durability is unknown.
spool_full507After making room.The spool holds its plan's maximum stored messages or payload bytes (see limits).
jsonc
{
  // The stats field the cap is enforced against.
  limit: "messages" | "dataBytes",

  // The cap.
  max: integer,
}

Retrying a change ​

Every operation that changes state – a send, an ack-and-send, a receive, a renew, the settles, a recover, a discard, and a queue create, update or delete – answers in two classes:

  • Changed nothing. Every 4xx, 503 and 507: each is answered before the change is attempted, so retrying one repeats nothing. Most are verdicts; the transient ones are 409 queue_creating, queue_busy and dedup_in_flight, 429 and 503. Such a status speaks for this attempt only: it says nothing about an earlier attempt whose response was lost.
  • May have changed. A 500 of any kind, a 502 or 504, or no response at all. operation_unconfirmed says so explicitly: the entry was written but its durability is unknown. Any other 500 is not proven to precede the change. A 502 or 504 means the gateway lost the node serving the spool and cannot tell one that was unreachable from one that went away after committing; a dropped connection or a client timeout is the same from the client's side.

What a retry in the second class does depends on the operation:

  • A send can append twice. A retry is safe only on a queue with a dedup window, carrying the key the first attempt carried, while the window still remembers it: within the window's duration, with the window unchanged in between. See deduplication.
  • An ack-and-send or a settle that committed answers 410 and changes nothing. A 410 on the retry does not prove the first attempt succeeded: the lease may instead have expired or become stale.
  • A receive is a second receive: it may lease a different message, while the first delivery stays leased until its lease times out and it is redelivered – or, on a queue with no lease timeout, until a primary change drops it.
  • A renew renews the lease from the moment of the retry; repeating it is safe.
  • A create that committed answers 409queue_exists.
  • An update applies the same settings again, to whatever queue has that name when the retry arrives. Give it the queue's uid and a retry cannot reach a queue created under the name since: it answers 412 queue_replaced and changes nothing.
  • A delete deletes whatever queue has that name when the retry arrives, including one created after the first delete committed. Give it the queue's uid and a retry cannot: once the first delete committed, the retry answers 404 queue_not_found, or 412 queue_replaced if a queue was created under the name since, and changes nothing.

Operations that change nothing – reading a queue, its stats, a listing, an inspect – are safe to retry.