settlement_pending: The voucher waits for the chain's clock

A stablecoin (contract v1 or v2) voucher is signed with the core's clock. When the chain has produced no block since then, its latest block time is still earlier than the voucher's signedAt, and the vault refuses a voucher signed after the block that settles it. The core reads the latest block's time first and sends nothing until the chain passes signedAt: nothing was sent, and nothing is lost.

What to do

On the wire

HTTP 409 with a Retry-After header. Without Dynamo-Error-Detail: 1 the body is { "error": "state", "reason": "settlement_pending", "detail": "…" }. With the header:

{
  "error": "state",
  "reason": "settlement_pending",
  "detail": "…",
  "errorDetail": {
    "type": "state_error",
    "code": "settlement_pending",
    "message": "…",
    "param": null,
    "doc_url": "…/errors/settlement_pending.md",
    "fix": "the voucher was signed after the chain's latest block time and the vault refuses it until the chain's clock passes it; nothing was sent and nothing is lost: retry after Retry-After, or let the scheduler settle it",
    "retry_after_ms": 61000
  }
}

See all error codes.