Skip to content
Gave

Errors

An error answers with its status and a JSON body. _tag names the error, message explains it, and some errors add fields:

SpendEventConflict
{
  "_tag": "SpendEventConflict",
  "id": "se:acme:alice:clearing:txn_0001",
  "message": "This event ID was already used by an event with different content"
}
Status_tagExtra fieldsRetry?
400InvalidRequestpart: Payload, Query, Params or HeadersNo: fix the request
401UnauthorizedNo: check your key
403IntegratorMismatchNo
403IntegratorSuspendedNo: contact Gave
409SpendEventConflictidNo: the ID was used with different content
409SimulationConflictreferenceNo: use a new reference
422EventInFutureNo: check the sender's clock
422SimulationRefusedreferenceNo
429RateLimitedretryAfterSecondsYes, after that delay
503UnavailableYes, with backoff

Retrying

Retry 429, 503, timeouts and network errors with the same request. Every write is idempotent, so a request that did go through the first time is answered as a duplicate, and changes nothing. Wait longer between each attempt, with some randomness, and give up after a bound you choose.

Never retry any other 4xx unchanged: it will be refused again.