Reference

Error codes

All error codes emitted by Auth Service, with HTTP status and default message.

Error codes

Auth Service uses a structured error response format for all API errors:

{
  "error": {
    "code": "APP_002",
    "message": "Application not found",
    "details": {}
  }
}

details is included only when there are validation errors to report (e.g. Zod parse failures).

Authentication (AUTH_)

CodeHTTPDefault message
AUTH_001401Missing or invalid authentication token
AUTH_002401Token expired
AUTH_003401Invalid credentials
AUTH_004401MFA required
AUTH_005401Invalid MFA code
AUTH_006403Account disabled
AUTH_007429Too many login attempts
AUTH_008400Invalid or expired password reset token
AUTH_009400Password too weak
AUTH_010409Email already registered

Application (APP_)

CodeHTTPDefault message
APP_001400Invalid application data
APP_002404Application not found
APP_003409Application slug already exists
APP_004400Cannot delete application with active users
APP_005403User does not have access to this application

Permissions (PERM_)

CodeHTTPDefault message
PERM_001400Invalid permission format
PERM_002404Role not found
PERM_003404Permission not found
PERM_004409Role name already exists in this application
PERM_005409Permission already defined
PERM_006400Cannot delete role assigned to active users

Subscriptions (SUB_)

CodeHTTPDefault message
SUB_001404Subscription plan not found
SUB_002409User already has an active subscription
SUB_003400Plan has active subscribers, cannot delete
SUB_004400Subscription expired

Consumption (CONS_)

CodeHTTPDefault message
CONS_001400Invalid key format
CONS_002400Value must be a finite number
CONS_003404User and application combination not found
CONS_004403Caller not authorized (requires client_credentials)

Users (USR_)

CodeHTTPDefault message
USR_001404User not found
USR_002400Cannot delete the last superadmin
USR_003400Invalid user data

Server (SRV_)

CodeHTTPDefault message
SRV_001500Internal server error
SRV_002503Service temporarily unavailable
SRV_003500Database error
Copyright © 2026