Skip to content

Exchange Not Activatable

URI: https://docs.ankatech.co/errors/exchange-not-activatable
HTTP Status: 422 Unprocessable Content

When you see this

You asked to activate a Cryptographic Exchange — activateExchange (POST /api/v3/admin/exchanges/{id}/activate) — and the Exchange is not READY. Activation is the one transition that starts only from READY: a DRAFT has not passed validateExchange yet, an ACTIVE or SUSPENDED Exchange already carries its Capability Grant, and REVOKED and EXPIRED are terminal. Nothing was written and no grant was created.

previewExchangeActivation (GET /api/v3/admin/exchanges/{id}/activation-preview) returns this same refusal, with the same type, for an Exchange that is DRAFT, REVOKED or EXPIRED — a state activation can never start from, so there is nothing to preview. For an ACTIVE or SUSPENDED Exchange the preview answers normally, in its NONE or RESTORE mode.

The Exchange's current status travels as the exchangeStatus extension member, so a client reads a value instead of parsing detail.

This is distinct from Invalid State Transition, which the other lifecycle verbs of an Exchange (suspend, resume, revoke, validate, discard) answer. Activation has its own type because a provisioning script needs to tell "already activated on an earlier run" apart from every other activation refusal — the key, the actor, the conferring authority — without parsing prose. On this type it can re-read the Exchange and treat ACTIVE as work already done; on any other, it must stop.

Common Causes

  • Activating a DRAFT that has not been validated yet.
  • Re-running a provisioning script against an Exchange a previous run already activated.
  • Activating an Exchange that was revoked or has expired.

Response Example

{
  "type": "https://docs.ankatech.co/errors/exchange-not-activatable",
  "title": "Exchange Not Activatable",
  "status": 422,
  "detail": "Exchange status DRAFT cannot be activated; only READY",
  "instance": "/api/v3/admin/exchanges/7d2f4a10-9c31-4b8e-a5d6-2f11c0b47e93/activate",
  "timestamp": 1730000000,
  "extensions": {
    "exchangeStatus": "DRAFT",
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details.

How to Resolve

  1. Read extensions.exchangeStatus.
  2. DRAFT: run validateExchange; when it reports no violations the Exchange becomes READY and can be activated.
  3. ACTIVE: the Exchange is already active — there is nothing to do. SUSPENDED: use resumeExchange, not activation.
  4. REVOKED or EXPIRED: the Exchange is terminal. Clone it with cloneExchange and activate the clone.

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