Skip to content

Error Codes ​

This document provides a comprehensive list of all error codes used in the WebmixHub API, organized by module. Each error code includes its HTTP status code, message, and description.

General HTTP Errors ​

These are standard HTTP error codes that can occur across different endpoints.

CodeHTTP StatusMessageDescription
BAD_REQUEST400Bad RequestThe request is malformed or contains invalid parameters
UNAUTHORIZED401UnauthorizedAuthentication required or authentication failed
FORBIDDEN403ForbiddenThe request is valid, but the user doesn't have permission
NOT_FOUND404Not FoundThe requested resource does not exist
CONFLICT409ConflictThe request conflicts with the current state of the resource
UNPROCESSABLE_ENTITY422Unprocessable EntityThe request is well-formed but contains semantic errors
TOO_MANY_REQUESTS429Too Many RequestsRate limit exceeded. Too many requests in a given time period
INTERNAL_SERVER500Internal Server ErrorAn unexpected error occurred on the server
SERVICE_UNAVAILABLE503Service UnavailableThe service is temporarily unavailable
REQUEST_TIMEOUT408Request TimeoutThe request took too long to process

Validation Errors ​

Validation errors are returned with the VALIDATION_ERROR code (which maps to BAD_REQUEST status) and include detailed field-level validation messages in the validation object.

CodeHTTP StatusMessageDescription
VALIDATION_ERROR400The request could not be processedRequest validation failed with field-level errors

Auth Module ​

Errors related to authentication and authorization operations.

CodeHTTP StatusMessageDescription
INVALID_CREDENTIALS401Invalid credentialsThe provided credentials (email/password) are incorrect
INVALID_REFRESH_TOKEN401Invalid refresh tokenThe refresh token is invalid, expired, or has been revoked
MISSING_TENANT_TOKEN401Missing tenant tokenTenant authentication token is missing from the request
MISSING_USER_TOKEN401Missing user tokenUser authentication token is missing from the request
INVALID_TENANT_TOKEN401Invalid tenant tokenTenant authentication token is invalid or malformed
INVALID_USER_TOKEN401Invalid user tokenUser authentication token is invalid or malformed
TOKEN_USER_NOT_FOUND401Token user not foundThe user referenced in the token does not exist
USER_ALREADY_EXISTS409User already existsA user with the provided email already exists
RESTRICTED_CAPABILITY403Capability is restrictedThe requested capability is not allowed for the specified authentication method
RESET_PASSWORD_USER_NOT_FOUND409Reset password user not foundUser attempting to reset password was not found or does not use password authentication
EXTERNAL_SERVICE_ERROR500External service errorAn error occurred while communicating with an external service

OTP Module ​

Errors related to One-Time Password operations.

CodeHTTP StatusMessageDescription
OTP_NOT_FOUND404OTP not foundThe OTP with the provided ID and scope does not exist
OTP_METHOD_NOT_ALLOWED422OTP method not allowedThe requested OTP method is not allowed for the specified scope
OTP_NOT_PENDING422OTP is not pendingOTP is not in a pending state (may already be verified, consumed, expired, failed, or cancelled)
OTP_EXPIRED422OTP has expiredThe OTP has passed its expiration time
OTP_CODE_INCORRECT422OTP code is incorrectThe provided OTP code does not match (attempt count is incremented)
OTP_MAX_ATTEMPTS422OTP has reached the maximum number of attemptsThe maximum number of verification attempts has been reached (status changed to failed)
OTP_RESEND_INTERVAL_NOT_EXPIRED422OTP resend interval not expiredThe required time interval between resends has not yet passed
OTP_MAX_RESENDS_REACHED422OTP has reached the maximum number of resendsThe maximum number of resends has been reached
OTP_NOT_CANCELABLE422OTP is not cancelableThe OTP cannot be cancelled (not in a pending state)
OTP_NOT_CONSUMABLE422OTP is not consumableThe OTP cannot be consumed (must be verified first or is in an invalid state)
OTP_ALREADY_CONSUMED422OTP already consumedThe OTP has already been consumed
OTP_CONSUME_CALLBACK_ERROR500OTP consume callback errorAn error occurred during the OTP consumption callback

Tenant Configuration Module ​

Errors related to tenant configuration.

CodeHTTP StatusMessageDescription
TENANT_NOT_CONFIGURED500Tenant configuration is not configuredThe tenant configuration for the requested service is missing or invalid

Common Runtime Errors ​

General runtime errors that can occur in various contexts.

CodeHTTP StatusMessageDescription
UNEXPECTED_STATE500Unexpected stateThe system is in an unexpected state that should not occur

Error Response Format ​

All error responses follow this structure:

json
{
  "meta": {
    "requestId": "string",
    "timestamp": "ISO 8601 date string"
  },
  "error": {
    "message": "Human-readable error message",
    "code": "ERROR_CODE",
    "status": 400,
    "validation": {}, // Optional: field-level validation errors
    "detail": {} // Optional: additional error information
  }
}

Notes ​

  • Error codes are machine-readable identifiers that can be used for programmatic error handling
  • The detail field structure varies based on the error code and may contain additional context

Last updated: