Skip to content

Exchange Not Editable

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

When you see this

You sent updateExchange (PATCH /api/v3/admin/exchanges/{id}) for a Cryptographic Exchange that is past the editable part of its lifecycle. Only a DRAFT or READY Exchange can be edited. Once it is ACTIVE, SUSPENDED, REVOKED or EXPIRED, its references are the ones its Capability Grant was composed from, and they are frozen.

The refusal is raised before anything is written: the Exchange and its version are unchanged.

The observed status travels as the exchangeStatus extension member, so a client reads a value instead of parsing detail. The activation refusal exchange-not-activatable publishes the same member for the same reason.

This is not Invalid State Transition. That type answers a lifecycle change the current state does not permit — suspend, resume, revoke, validate or discard — and its remedy is to pick a transition that is valid from the current state. An edit requests no lifecycle change at all, so that remedy does not apply: there is no verb that makes this Exchange editable again.

Common Causes

  • Editing an Exchange after activating it, for example to point it at a different key or actor.
  • A console tab or script that read the Exchange while it was READY and saved after someone else activated it.
  • Editing a revoked or expired Exchange to reuse its configuration.

Response Example

{
  "type": "https://docs.ankatech.co/errors/exchange-not-editable",
  "title": "Exchange Not Editable",
  "status": 422,
  "detail": "Exchange status ACTIVE is not editable; only DRAFT or READY may be edited. Clone the Exchange to edit a copy.",
  "instance": "/api/v3/admin/exchanges/7d2f4a10-9c31-4b8e-a5d6-2f11c0b47e93",
  "timestamp": 1730000000,
  "extensions": {
    "exchangeStatus": "ACTIVE",
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. Nothing you submitted in the body is echoed back.

How to Resolve

  1. Read extensions.exchangeStatus to confirm the Exchange's current state.
  2. To change an Exchange that is in use, clone it with cloneExchange (POST /api/v3/admin/exchanges/{id}/clone). The clone is a new DRAFT carrying the same references, and it can be edited, validated and activated.
  3. If the original must stop authorizing, revoke it with revokeExchange. Revoking retires its Capability Grant, which also frees the grant's five dimensions for the clone to activate over — see Capability Grant Dimensions Conflict.

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