Error Codes

Complete reference of 22 error codes returned by the Vault Service API.

Error Response Format

{
  "statusCode": 404,
  "message": "Asset not found",
  "error": "ERR_VAULT_NOT_FOUND",
  "timestamp": "2026-02-21T12:00:00.000Z",
  "path": "/vault/v1/assets/abc-123",
  "method": "GET",
  "request_id": "uuid",
  "tenantId": "uuid"
}

400 Bad Request

Errors caused by invalid client input.

CodeHTTPNameResolution
ERR_VAULT_INVALID_INPUT400Validation FailedRefer to the API Reference for required fields and types.
ERR_VAULT_INVALID_MIME_TYPE400Unsupported File TypeUse allowed MIME types: image/*, video/*, audio/*, application/pdf. Allowed types vary by tier.
ERR_VAULT_INVALID_FILE_SIZE400File Too LargeReduce file size or upgrade plan to increase per-file size limit.
ERR_VAULT_FOLDER_NOT_EMPTY400Folder Not EmptyMove or delete all contents within the folder first, or use ?force=true (admin only).
ERR_VAULT_CIRCULAR_REFERENCE400Circular ReferenceChoose a different parent folder. A folder cannot be moved into itself or descendants.
ERR_VAULT_INVALID_VERSION400Invalid VersionCheck version history via GET /vault/v1/assets/:id/versions first.

401 Unauthorized

Errors caused by missing or invalid authentication.

CodeHTTPNameResolution
ERR_VAULT_UNAUTHORIZED401Missing/Invalid JWTInclude a valid Bearer token from auth-svc. Ensure the token has not been revoked.
ERR_VAULT_TOKEN_EXPIRED401Token ExpiredRefresh token via auth-svc refresh endpoint. Do not reuse expired tokens.

403 Forbidden

Errors caused by insufficient permissions or exceeded quotas.

CodeHTTPNameResolution
ERR_VAULT_FORBIDDEN403Insufficient PermissionsCheck the required role for the endpoint. Contact your tenant admin for elevated access.
ERR_VAULT_LEGAL_HOLD403Asset Under Legal HoldRelease legal hold first via DELETE /vault/v1/assets/:id/legal-hold (admin only).
ERR_VAULT_QUOTA_EXCEEDED403Quota ExceededUpgrade tier or delete files. Check usage via GET /vault/v1/quota.
ERR_VAULT_PRIVATE_ASSET403Private AssetChange visibility to public via PATCH /vault/v1/assets/:id, then retry.

404 Not Found

Errors caused by referencing non-existent resources.

CodeHTTPNameResolution
ERR_VAULT_NOT_FOUND404Not FoundVerify ID exists and belongs to your tenant. Assets are isolated via RLS.
ERR_VAULT_PARENT_NOT_FOUND404Parent Folder Not FoundVerify parent folder ID. List available folders via GET /vault/v1/folders.

409 Conflict

Errors caused by conflicting state or business rule violations.

CodeHTTPNameResolution
ERR_VAULT_DUPLICATE409Duplicate AssetUse the existing asset (ID returned in error details) or force upload.
ERR_VAULT_FOLDER_EXISTS409Folder ExistsChoose a different folder name or move the existing folder.

500 Internal Server Error

Server-side failures. Report if persistent.

CodeHTTPNameResolution
ERR_VAULT_UPLOAD_FAILED500Upload FailedCheck S3 bucket permissions. Verify IAM role has s3:PutObject. Retry after a brief delay.
ERR_VAULT_TRANSFORM_FAILED500Transform FailedCheck input format and options. Verify source asset is not corrupted. Check CloudWatch logs.
ERR_VAULT_DB_ERROR500Database ErrorCheck DB connectivity and RLS config. Review CloudWatch logs with request_id.
ERR_VAULT_KAFKA_ERROR500Kafka ErrorCheck MSK Serverless cluster health. Review CloudWatch logs with request_id.

503 Service Unavailable

Downstream service unavailability.

CodeHTTPNameResolution
ERR_VAULT_DB_UNAVAILABLE503DB UnavailableCheck Aurora PostgreSQL status in AWS Console. Verify VPC security groups.
ERR_VAULT_CACHE_UNAVAILABLE503Cache UnavailableCheck ElastiCache status. Verify Redis endpoint is reachable from Lambda security group.