TMA CloudTMA Cloud
Reference

Error Codes

Complete reference for all error codes in TMA Cloud API.

Complete reference for all error codes in TMA Cloud API.

How Errors Are Returned

Every error response carries a message. Only some carry a machine-readable error code as well:

{
  "message": "Upload cancelled by client",
  "error": "REQUEST_ABORTED"
}

The list below is the complete set of error values the backend emits. Anything not listed here returns message alone, so clients should branch on the HTTP status code and fall back to message rather than expecting a code for every failure.

Upload and Storage

CodeStatusWhen
STORAGE_LIMIT_EXCEEDED413The upload would push the account past its quota
STORAGE_CHECK_FAILED500The quota could not be read, so the upload is refused rather than let through
REQUEST_ABORTED499Client cancelled the upload mid-request

Files and Documents

CodeStatusWhen
FILE_NOT_FOUND404Filesystem ENOENT reached the error handler
MIME_TYPE_MISMATCH400OnlyOffice viewer: stored MIME type contradicts the extension. Returned as JSON for XHR requests; direct browser navigation gets an HTML error page instead

Authentication

CodeStatusWhen
INVALID_TOKEN401JWT failed verification
TOKEN_EXPIRED401JWT is past its expiry

Login failures, missing MFA codes and permission denials return a message only — there is no INVALID_CREDENTIALS or FORBIDDEN code to match on. Use the status code.

Access Restrictions

CodeStatusWhen
DESKTOP_ONLY_ACCESS403Instance is in desktop-app-only mode and the request is from a browser
PERMISSION_DENIED403Filesystem EACCES reached the error handler

Database

CodeStatusWhen
DUPLICATE_RESOURCE409PostgreSQL unique violation (23505)
INVALID_REFERENCE400PostgreSQL foreign key violation (23503)

System

CodeStatusWhen
INTERNAL_ERROR500Anything that reaches the error handler unmatched
FRONTEND_NOT_BUILT404A non-API route was requested but frontend/dist is missing

Validation Errors

Validation failures return 422 with a details array rather than an error code:

{
  "message": "Validation failed",
  "details": [{ "email": "Invalid email format" }]
}

Rate Limit Errors

The rate limiters return 429 with an error field holding a human-readable sentence, not a code:

{ "error": "Too many requests, please try again later" }

The backup-code cooldown is the exception — it returns message plus retryAfterMs. See Rate Limits.

On this page