Skip to content

Invalid State Transition

URI: https://docs.ankatech.co/errors/invalid-state-transition
HTTP Status: 422 Unprocessable Entity

When you see this

The lifecycle state change you requested is not permitted from the resource's current state.

Common Causes

  • Attempting a transition the lifecycle state machine does not allow from the current state.
  • Trying to move a resource backward in its lifecycle.
  • Requesting a transition on a resource already in a terminal state.

Response Example

{
  "type": "https://docs.ankatech.co/errors/invalid-state-transition",
  "title": "Invalid State Transition",
  "status": 422,
  "detail": "Cannot transition from 'REVOKED' to 'ACTIVE'. The transition is not permitted.",
  "instance": "/api/v3/admin/keys/my-mlkem-key/state",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1730000000
}

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

How to Resolve

  1. Read the response detail to learn the current state and the disallowed transition.
  2. Choose a transition that is valid from the current state.
  3. If the resource is in a terminal state, create a replacement instead of transitioning it.

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