Skip to content

Variable: IdempotencyCode

ts
const IdempotencyCode: object;

Machine-readable control codes the API returns (as a 409 with the code in the body, lifted onto NosanaApiError.code) for an idempotent request.

The kit owns only this wire contract — which code maps to retry / fatal / fresh-key is the caller's policy. Removing or renaming a member is a breaking change, so consumers branching on these get a compile signal if they drift.

These constants mirror the IdempotencyCode enum in the client-manager OpenAPI spec; keep them in sync when the spec changes.

  • IN_PROGRESS — a matching request is still in flight; retry the same key later (honouring retryAfter).
  • EXPIRED — the prepared transaction is provably dead; re-post with a fresh key.
  • PAYLOAD_MISMATCH — the same key was reused with a different payload; fatal.

Type Declaration

NameType
EXPIRED"IDEMPOTENCY_KEY_EXPIRED"
IN_PROGRESS"IDEMPOTENCY_KEY_IN_PROGRESS"
PAYLOAD_MISMATCH"IDEMPOTENCY_KEY_PAYLOAD_MISMATCH"