Previous Release Format
URI: https://docs.ankatech.co/errors/previous-release-format
HTTP Status: 422 Unprocessable Entity
When you see this
A token submitted to the Core API is in the format a previous release wrote, which this release neither writes nor reads:
- a JWS whose protected header declares
typJWT(its payload a JWT claims set, the format the previous release's signers wrote), or - a JWE whose protected header carries
tid.
It is decided from the protected header alone, and returned by these operations:
| Operation | Refused when |
|---|---|
POST /api/v3/crypto/decrypt (decryptData) | the JWE carries tid |
POST /api/v3/crypto/reencrypt (reencryptData) | the JWE carries tid |
POST /api/v3/crypto/verify (verifySignature) | a signature's protected header declares typ: JWT |
POST /api/v3/crypto/resign (resignData) | a signature's protected header declares typ: JWT |
POST /api/v3/crypto/decrypt-verify (decryptThenVerify) | the outer JWE carries tid, or the inner JWS declares typ: JWT |
POST /api/v3/crypto/stream/decrypt (decryptStream) | the detached JWE header carries tid |
POST /api/v3/crypto/stream/reencrypt (reencryptDataStream) | the detached JWE header carries tid |
POST /api/v3/crypto/stream/decrypt-verify (decryptVerifyStream) | the outer detached JWE header carries tid |
POST /api/v3/crypto/stream/verify (verifySignatureStream) | a signature of the detached JWS declares typ: JWT |
POST /api/v3/crypto/stream/resign (resignDataStream) | a signature of the detached JWS declares typ: JWT |
The refusal comes before any key is resolved, any grant is decided or charged, anything is metered and anything is signed. On decryptThenVerify an inner JWS declaring typ: JWT is judged only after the outer decryption, which is performed and counted; no plaintext is released. The operation's crypto audit record carries previous-release-format as its error code.
On the streaming operations the header is judged before the response starts, so the refusal is this same 422 problem. The one exception is the inner JWS of decryptVerifyStream: its format is judged once the response has already started, before any of its payload is read and before any signer is admitted, so this problem is not returned for it. The outcome is the INVALID verdict, with every signature unverified, and the audit record carries the same error code.
Common Causes
- Data protected with a previous release and stored, then submitted to this release for decryption, re-encryption, verification or re-signing.
Response Example
{
"type": "https://docs.ankatech.co/errors/previous-release-format",
"title": "Previous Release Format",
"status": 422,
"detail": "This token is in a previous release's format, which this release no longer reads: a JWS whose protected header declares typ JWT, or a JWE whose protected header carries tid. Sign or encrypt the data again.",
"instance": "/api/v3/crypto/decrypt",
"correlationId": "2b7e9c41-6d3a-4f85-a0c2-8e1d5b9f3a67",
"timestamp": 1763112600
}
Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. The detail names the format only, never a key, a tenant or a header value.
How to Resolve
- Identify the stored data that is in the previous release's format.
- Sign or encrypt the data again with this release.
For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.