Common Errors & Solutions
Frequently encountered errors when using AnkaSecure and how to resolve them.
Authentication Errors
AUTH_001: Token Validation Failed
Symptom:
{
"error": "AUTH_001",
"message": "Token validation failed: token expired",
"timestamp": "2025-12-26T10:15:30Z"
}
HTTP Status: 401 Unauthorized
Common Causes: - JWT token expired (1-hour lifetime) - API key invalid or revoked - Token signature invalid
Solutions:
-
For JWT tokens: Refresh token before expiration
-
For API keys: Verify key is correct
-
Regenerate API key: Via Admin Console → Applications → Regenerate
AUTH_003: Access Denied
Symptom:
HTTP Status: 403 Forbidden
Common Causes:
- Trying to access another tenant's resources
- X-Tenant-ID header doesn't match JWT claim
- Insufficient permissions
Solutions:
-
Verify tenant ID:
-
Check permissions: Contact tenant admin to grant required role
Key Management Errors
KEY_001: Key Not Found
Symptom:
HTTP Status: 404 Not Found
Common Causes: - Key ID doesn't exist - Typo in key ID (case-sensitive) - Key belongs to different tenant
Solutions:
-
List available keys:
-
Verify key ID (case-sensitive):
-
Generate missing key:
KEY_003: Key Already Exists
Symptom:
HTTP Status: 409 Conflict
Solutions:
-
Use unique key ID:
-
Delete existing key (if replacing):
Cryptographic Errors
CRYPTO_001: Ciphertext Integrity Failure
Symptom:
{
"error": "CRYPTO_001",
"message": "Ciphertext integrity check failed: authentication tag mismatch"
}
HTTP Status: 422 Unprocessable Entity
Common Causes: - Ciphertext modified or corrupted - Wrong decryption key used - Encoding issues (Base64)
Solutions:
-
Verify ciphertext not modified:
-
Check Base64 encoding:
-
Use correct key: AnkaSecure auto-selects key from JWE header (don't override)
CRYPTO_005: Algorithm Not Supported
Symptom:
HTTP Status: 400 Bad Request
Solutions:
-
Verify algorithm name (case-sensitive):
-
List supported algorithms:
Rate Limiting Errors
RATE_001: Rate Limit Exceeded
Symptom:
{
"error": "RATE_001",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60
}
HTTP Status: 429 Too Many Requests
Solutions:
-
Check rate limit headers:
-
Implement exponential backoff:
-
Reduce request rate: Add delays between operations
-
Upgrade tier: sales@ankatech.co for higher rate limits
Quota Errors
QUOTA_001: Monthly Quota Exceeded
Symptom:
{
"error": "QUOTA_001",
"message": "Monthly quota exceeded. Upgrade plan or wait for reset.",
"quotaLimit": 100000,
"quotaUsed": 100143,
"resetDate": "2025-01-01T00:00:00Z"
}
HTTP Status: 402 Payment Required
Solutions:
-
Check quota usage:
-
Optimize usage: Reduce unnecessary operations (cache results, batch requests)
-
Upgrade plan: sales@ankatech.co
Validation Errors
VALIDATION_001: Invalid Request Body
Symptom:
{
"error": "VALIDATION_001",
"message": "Invalid request body",
"details": [
{
"field": "algorithm",
"issue": "Must be one of: ML-KEM-512, ML-KEM-768, ML-KEM-1024",
"received": "KYBER-768"
}
]
}
HTTP Status: 400 Bad Request
Solutions:
-
Use official algorithm names:
-
Verify field names:
File Size Errors
PAYLOAD_001: Payload Too Large
Symptom:
{
"error": "PAYLOAD_001",
"message": "Payload exceeds 5 MB limit. Use streaming API.",
"payloadSize": 10485760,
"maxSize": 5242880
}
HTTP Status: 413 Payload Too Large
Solutions:
Use streaming API for files >5 MB:
# ✅ CORRECT: Streaming for large files
ankasecure-cli stream-encrypt \
--key-id my-key \
--input large-file.bin \
--output large-file.enc
# ❌ WRONG: Compact API for large files
ankasecure-cli encrypt \
--key-id my-key \
--input large-file.bin # Fails if >5 MB
See streaming API documentation →
Getting Help
Before Contacting Support
Gather diagnostic information:
-
CLI version:
-
Configuration:
-
Error details:
- Full error message
- HTTP status code
- Correlation/trace ID
-
Command executed
-
Network test:
Contact Support
Email: support@ankatech.co
Include: - CLI version - Error message (full JSON) - Trace ID / Correlation ID - Command executed (redact API key) - Operating system (Linux, macOS, Windows)
Response Time: - Free tier: 2-3 business days - Paid tiers: 1 business day (P1: 4 hours) - Enterprise: 4 hours (P1: 1 hour)
Related Resources
- API Error Guide - REST API error troubleshooting
- Error Catalog - Complete error code reference
- CLI Commands - Command reference
- SDK Troubleshooting - SDK-specific issues
Documentation Version: 3.0.0 Last Updated: 2025-12-26