Skip to content

Custody Swap Incomplete

URI: https://docs.ankatech.co/errors/custody-swap-incomplete
HTTP Status: 409 Conflict

When you see this

The swap of a key custody window was refused because at least one of the tenant's keys holds no copy staged under the destination key-encryption key at its current version — a key created, changed or staged again after the prepare step. The swap replaces every live wrapped key with its staged copy in one transaction, or none; it wrote nothing.

This problem is answered by the key service to the platform's own administration service while it drives a key custody move, one bounded re-wrap step per call. It is never answered to a browser, an SDK or an API client, so its instance names an internal call and is not reproduced here. An operator sees its effect on the move instead: the move's state on the tenant's key custody read, and the audit trail of the move.

Response Example

{
  "type": "https://docs.ankatech.co/errors/custody-swap-incomplete",
  "title": "Custody Swap Incomplete",
  "status": 409,
  "detail": "Not every key holds a staged copy at its current version; nothing was swapped.",
  "correlationId": "6a0c2f9e-3d71-4b58-8e24-c1f5a7d9b036",
  "timestamp": 1793696400
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. The detail is fixed: it names no tenant, key, key-encryption key or count.

How to Resolve

  1. The engine treats the refusal as definitive for the window: the move goes to ABORTING and the tenant reopens ACTIVE on its unchanged source, with its keys, backend and key-encryption keys exactly as before.
  2. Schedule the move again. A key created while the tenant was entering the window is staged by the new move's prepare.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.