Skip to content

Error Reference Index

This section provides a comprehensive reference for all error responses returned by the AnkaSecure API. Each error includes a unique URI, HTTP status code, and detailed resolution guidance.

Quick Reference Table

HTTP Code Error Type URI
400 Invalid Input https://docs.ankatech.co/errors/invalid-input
400 Invalid PKCS#7 Structure https://docs.ankatech.co/errors/invalid-pkcs7
400 Missing Request Part https://docs.ankatech.co/errors/missing-request-part
400 Validation Error https://docs.ankatech.co/errors/validation
400 Unsupported Keystore Format https://docs.ankatech.co/errors/unsupported-keystore-format
400 Key Operation Incompatible https://docs.ankatech.co/errors/key-operation-incompatible
400 Invalid Operation Name https://docs.ankatech.co/errors/invalid-operation-name
400 Signature Mismatch https://docs.ankatech.co/errors/signature-mismatch
400 Query Range Exceeded https://docs.ankatech.co/errors/query-range-exceeded
400 Invalid Request https://docs.ankatech.co/errors/invalid_request
400 Invalid Grant https://docs.ankatech.co/errors/invalid_grant
400 Unsupported Grant Type https://docs.ankatech.co/errors/unsupported_grant_type
400 Invalid Scope https://docs.ankatech.co/errors/invalid_scope
400 Tenant Selection Required https://docs.ankatech.co/errors/tenant_selection_required
401 Unauthorized https://docs.ankatech.co/errors/unauthorized
401 Invalid Client https://docs.ankatech.co/errors/invalid_client
401 Unauthorized Client https://docs.ankatech.co/errors/unauthorized_client
402 Payment Required https://docs.ankatech.co/errors/payment-required
403 Forbidden https://docs.ankatech.co/errors/forbidden
403 SaaS-Only Feature https://docs.ankatech.co/errors/saas-only-feature
403 Unsupported Principal Type https://docs.ankatech.co/errors/unsupported-principal-type
403 Access Denied https://docs.ankatech.co/errors/access_denied
404 Resource Not Found https://docs.ankatech.co/errors/not-found
404 Material Version Not Found https://docs.ankatech.co/errors/material-version-not-found
405 Method Not Allowed https://docs.ankatech.co/errors/method-not-allowed
409 Conflict https://docs.ankatech.co/errors/conflict
409 Invalid Key State https://docs.ankatech.co/errors/invalid-key-state
409 Concurrent Modification https://docs.ankatech.co/errors/concurrent-modification
409 Data Integrity Error https://docs.ankatech.co/errors/data-integrity
409 Duplicate KID https://docs.ankatech.co/errors/duplicate-kid
409 Cascade Subset Violation https://docs.ankatech.co/errors/cascade-subset-violation
409 Deployment Policy Locked https://docs.ankatech.co/errors/locked-deployment-policy
409 Counterparty Type Still Referenced https://docs.ankatech.co/errors/counterparty-type-referenced
409 Marketplace Bootstrap In Progress https://docs.ankatech.co/errors/marketplace-bootstrap-in-progress
412 Precondition Failed https://docs.ankatech.co/errors/precondition-failed
413 Payload Too Large https://docs.ankatech.co/errors/payload-too-large
413 License Artifact Too Large https://docs.ankatech.co/errors/license-artifact-too-large
415 Unsupported Media Type https://docs.ankatech.co/errors/unsupported-media-type
422 Unprocessable Entity https://docs.ankatech.co/errors/unprocessable-entity
422 Unsupported PKCS#7 Format https://docs.ankatech.co/errors/unsupported-pkcs7-format
422 Missing Private Key https://docs.ankatech.co/errors/missing-private-key
422 Decryption Failed https://docs.ankatech.co/errors/decryption-failed
422 Purpose Required https://docs.ankatech.co/errors/purpose-required
422 Rotation Purpose Violation https://docs.ankatech.co/errors/rotation-purpose-violation
422 Rotation Security Downgrade https://docs.ankatech.co/errors/rotate-security-downgrade
422 Dual Not Applicable https://docs.ankatech.co/errors/dual-not-applicable
422 Composite Wire Shape Mismatch https://docs.ankatech.co/errors/composite-wire-shape-mismatch
422 Composite Component Algorithm Mismatch https://docs.ankatech.co/errors/composite-component-algorithm-mismatch
422 Invalid State Transition https://docs.ankatech.co/errors/invalid-state-transition
422 Invalid Material Transition https://docs.ankatech.co/errors/material-status-invalid-transition
422 Invalid Stable KID Transition https://docs.ankatech.co/errors/stable-kid-status-invalid-transition
422 Purpose Mismatch https://docs.ankatech.co/errors/purpose-mismatch
422 Algorithm Not Permitted for Operation https://docs.ankatech.co/errors/algorithm-not-permitted-for-operation
422 Tenant Type Restriction https://docs.ankatech.co/errors/tenant-type-restriction
422 Tenant Policy Subset Violation https://docs.ankatech.co/errors/tenant-policy-subset-violation
422 Lifecycle Policy Subset Violation https://docs.ankatech.co/errors/lifecycle-policy-subset-violation
422 Import Operation Not Orchestrable https://docs.ankatech.co/errors/import-operation-not-orchestrable-by-use-case
422 Composite-Pair Operation Not Supported https://docs.ankatech.co/errors/composite-pair-operation-requires-multi-key-use-case-not-yet-supported
422 License Artifact Invalid https://docs.ankatech.co/errors/license-artifact-invalid
422 License Deployment Mismatch https://docs.ankatech.co/errors/license-deployment-mismatch
422 License Expired https://docs.ankatech.co/errors/license-expired
429 Too Many Requests https://docs.ankatech.co/errors/too-many-requests
429 Refresh Cooldown Active https://docs.ankatech.co/errors/refresh-cooldown
4xx Client Error https://docs.ankatech.co/errors/client-error
500 Internal Server Error https://docs.ankatech.co/errors/internal
500 Cryptographic Error https://docs.ankatech.co/errors/crypto
500 Repository Error https://docs.ankatech.co/errors/repository
500 Admin Operation Failed https://docs.ankatech.co/errors/admin-operation
500 Keystore Error https://docs.ankatech.co/errors/keystore
500 Data Access Error https://docs.ankatech.co/errors/data-access
501 Not Implemented https://docs.ankatech.co/errors/not-implemented
502 Upstream Service Unavailable https://docs.ankatech.co/errors/upstream-unavailable
503 Service Unavailable https://docs.ankatech.co/errors/service-unavailable
503 Async Not Usable https://docs.ankatech.co/errors/async-not-usable
503 Data Source Unavailable https://docs.ankatech.co/errors/data-source-unavailable
503 Marketplace Temporarily Disabled https://docs.ankatech.co/errors/marketplace-temporarily-disabled
503 Snapshot Stale https://docs.ankatech.co/errors/snapshot-stale
503 Stats Snapshot Unavailable https://docs.ankatech.co/errors/stats-snapshot-unavailable
503 Audit Event Publishing Failed https://docs.ankatech.co/errors/kafka-publish-failure
504 Upstream Service Timeout https://docs.ankatech.co/errors/upstream-timeout
504 Gateway Timeout https://docs.ankatech.co/errors/gateway-timeout

Error Response Format

All errors follow the RFC 7807 Problem Details standard and are returned with Content-Type: application/problem+json. The body is a flat JSON object — there is no nested error envelope:

{
  "type": "https://docs.ankatech.co/errors/error-type",
  "title": "Human-readable error title",
  "status": 422,
  "detail": "Additional context about the error",
  "instance": "/api/v3/migration/convert-pkcs7-to-jose",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1730000000
}

The core fields are defined by RFC 7807:

  • type - URI identifying the error category (links to the matching page in this reference)
  • title - Short, human-readable summary of the error type
  • status - HTTP status code, repeated in the body for convenience
  • detail - Human-readable explanation specific to this occurrence
  • instance - The request path that produced the error

Two platform extensions accompany the standard fields:

  • correlationId - Request correlation identifier, for correlation with server-side logs
  • timestamp - Epoch-seconds timestamp of when the error was produced

Some errors add further extensions (for example, PKCS#7 conversion errors include an errorCode and recipient metadata; OAuth 2.0 errors mirror the RFC 6749 error/error_description fields). See the individual error pages for details.

OAuth 2.0 token-endpoint errors (invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_scope, tenant_selection_required, access_denied) use an underscore type suffix so the RFC 7807 type matches the RFC 6749 error code exactly.

Client Errors (4xx)

Client errors indicate that the request contains incorrect syntax or cannot be fulfilled due to client-side issues.

400 Bad Request

401 Unauthorized

  • Unauthorized - Missing or invalid authentication credentials
  • Invalid Client - OAuth 2.0: OAuth 2.0 client authentication failed
  • Unauthorized Client - OAuth 2.0: OAuth 2.0 client is not authorized to use the requested grant type

402 Payment Required

  • Payment Required - License expired or usage limits exceeded, payment or renewal needed

403 Forbidden

404 Not Found

405 Method Not Allowed

409 Conflict

412 Precondition Failed

413 Payload Too Large

415 Unsupported Media Type

422 Unprocessable Entity

429 Too Many Requests

4xx Generic

  • Client Error - General client error fallback for unspecified 4xx status codes

Server Errors (5xx)

Server errors indicate that the server failed to fulfill a valid request.

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

  • Upstream Service Timeout - An internal upstream dependency did not respond within the operation's deadline; retryable
  • Gateway Timeout - An upstream dependency did not respond within the operation's deadline; retryable

Error Handling Best Practices

Retry Strategy

  • 4xx errors: Generally should NOT be retried without fixing the request
  • 5xx errors: May be retried with exponential backoff
  • 502/504 errors: Retryable - honor the Retry-After header when present (emitted while the circuit breaker toward the failing upstream is open), otherwise apply exponential backoff
  • 503 errors: Should be retried after the delay specified in Retry-After header
  • 429 errors: Honor the Retry-After header before retrying

Error Logging

Always log the following from error responses:

  • correlationId - For correlation with server-side logs
  • timestamp - For temporal analysis
  • type - For programmatic error handling
  • detail - For debugging context

Programmatic Error Handling

// Example: dispatch on the RFC 7807 `type` URI
switch (problemDetails.getType().toString()) {
    case "https://docs.ankatech.co/errors/payment-required":
        redirectToPaymentPortal();
        break;
    case "https://docs.ankatech.co/errors/validation":
        displayFieldErrors(problemDetails.getDetail());
        break;
    case "https://docs.ankatech.co/errors/not-found":
        handleMissingResource();
        break;
    default:
        logErrorAndNotifyUser(problemDetails);
}

Rate Limiting

When encountering rate limit errors:

  1. Check the X-RateLimit-Remaining header
  2. Respect the X-RateLimit-Reset timestamp
  3. Implement client-side throttling
  4. Consider upgrading your plan for higher limits

Additional Resources

Need Help?

If you encounter an error not documented here or need assistance resolving persistent errors:

  1. Check the correlationId from the error response
  2. Review server status at status.ankatech.co
  3. Contact support with the error details and correlationId
  4. Consult the Developer Hub Reference for endpoint-specific requirements