Error Codes Reference

This page documents all error codes returned by the L3DRM authentication system. These codes appear in session logs and help diagnose authentication issues.

Error Code Categories

PrefixCategoryHTTP StatusDescription
AUTH_Authentication401Request authentication failures (credentials, API key, payload)
AUTHZ_Authorization403Access control failures (key status, user blocked, permissions)
RATE_Rate Limiting429Too many failed authentication attempts
PRE_Pre-Check403Pre-validation failures before full authentication (API key revoked, user blocked)
SRV_Server5xxServer-side errors (internal errors, database issues)
TMPR_Client-SideN/ALocal tamper detection and integrity errors raised by the WASM module

Authentication Errors (HTTP 401)

These errors occur when the request cannot be authenticated.

CodeDescriptionTrigger ConditionMessage
AUTH_001Invalid user agentThe DRM library is not properly integrated - User-Agent must start with "KittyHawk"Authentication failed
AUTH_002Missing credentialsThe DRM request is missing required encrypted payload fieldsAuthentication failed
AUTH_003Invalid Client API keyThe Client API key in the WASM build is invalid or not configured in the dashboardInvalid or incorrect key
AUTH_004Inactive Client API keyThe Client API key has been deactivated - the product needs to be updatedPlease update this product
AUTH_005Malformed payloadPayload decryption failed - possible tampering or corrupted DRM libraryAuthentication failed

Authorization Errors (HTTP 403)

These errors occur when the request is authenticated but access is denied.

CodeDescriptionTrigger ConditionMessage
AUTHZ_001Activation key not foundThe activation key doesn't exist for this projectInvalid or incorrect key
AUTHZ_002Activation key disabledThe activation key has been disabled in the dashboardKey is inactive
AUTHZ_003Activation key expiredThe activation key's expiry date has passedKey has expired
AUTHZ_004User blockedThis Xbox/MSFS username has been blocked by the project ownerAccess denied
AUTHZ_005Invalid WASM hashThe WASM binary hash doesn't match an approved version - possible tampering or outdated buildAccess denied
AUTHZ_006Missing WASM hashHash verification is required but the client didn't provide a file hashAccess denied
AUTHZ_007User switch cooldownUser changed too recently - the cooldown period (configured per project) has not elapsedAccess denied
AUTHZ_009User switch disabledThis project does not allow username changes on activation keysAccess denied
AUTHZ_008Activation key requiredThis project requires an activation key - store/keyless authentication is disabledAccess denied

Pre-Check Errors (HTTP 403)

These errors occur during the pre-validation step, before the full authentication flow runs.

CodeDescriptionTrigger ConditionMessage
PRE_001API key revokedThe Client API key has been revoked or is inactive - checked during the pre-validation stepAccess denied
PRE_002User blocked (pre-check)This Xbox/MSFS username has been blocked - checked during the pre-validation stepAccess denied

Rate Limiting Errors (HTTP 429)

These errors protect against brute force and credential stuffing attacks.

CodeDescriptionTrigger ConditionMessage
RATE_001Activation key rate limitedToo many failed attempts with this key (10+ failures in 10 minutes)Too many requests
RATE_002User rate limitedToo many failed attempts for this user (5+ failures in 10 minutes)Too many requests

Rate Limiting Details:

  • RATE_001 (Per-Key): 10 failed attempts within 10 minutes
  • RATE_002 (Per-User): 5 failed attempts within 10 minutes

Failed attempts are counted from the sessions table where auth_response != '200'.


Server Errors (HTTP 5xx)

These errors indicate server-side issues.

CodeHTTP StatusDescriptionTrigger Condition
SRV_001500Internal server errorUnexpected server error - please try again or contact support
SRV_002503Database unavailableDatabase is temporarily unavailable - please try again in a few moments

Client-Side Errors (Tamper Detection)

These errors are raised locally by the WASM module. They do not involve a server request. If autoAbort is enabled, the module will crash; otherwise, the onTamper callback is called.

Tip: Enable .debug(true) in your builder (in a debug build only) to see additional details about tamper events in the MSFS console.

WASM Signature Verification

These errors indicate the WASM binary's embedded signature is missing or invalid. Run WasmSigner.exe on the final .wasm file before distribution.

CodeDescriptionTrigger Condition
TMPR_001WASM signature verification failed (startup)Raised during Builder::build(). The WASM binary's embedded signature is invalid — make sure WasmSigner.exe has been used on the final .wasm file before distribution
TMPR_002WASM signature verification failedRaised by VerifySignature(). The WASM binary's signature check failed — make sure WasmSigner.exe has been used on the final .wasm file and that the file was not modified afterwards
TMPR_005WASM signature not verifiedRaised by AssureAuthenticated1-5() or Integrity1-5(). The WASM signature verification flag was not set — ensure WasmSigner.exe has been used and the .wasmPath() builder option points to the correct signed file

Authentication State

These errors indicate a problem with the authentication state — either authentication hasn't completed, or a local pre-check determined the license is invalid.

CodeDescriptionTrigger Condition
TMPR_003Not authenticatedRaised by AssureAuthenticated1-5(). A protected function was called before authentication completed — ensure the onSuccess callback has fired before calling AssureAuthenticated or Integrity functions
TMPR_004Authentication state integrity check failedRaised by AssureAuthenticated1(). The authentication state failed an internal consistency check — this may indicate the authentication result was externally modified
TMPR_018Pre-check: license blocked or revokedRaised by AssureAuthenticated1-5() or Integrity1-5(). The DRM module determined during a local pre-check that the user account or API key has been blocked or revoked — check the dashboard for the user's status

Runtime Integrity Monitoring

These errors are raised by the runtime integrity system which continuously validates internal DRM state. Under normal operation these should never occur — they indicate that DRM memory was externally modified.

CodeDescriptionTrigger Condition
TMPR_006Internal state validation failedRaised by AssureAuthenticated1-5() or Integrity1-5(). A cross-validation of internal DRM state detected an inconsistency — this may indicate memory was externally modified
TMPR_007Internal counter out of boundsRaised by AssureAuthenticated1-5() or Integrity1-5(). An internal counter exceeded its expected range — this may indicate the DRM state was externally modified
TMPR_008Periodic event staleRaised by AssureAuthenticated1-5() or Integrity1-5(). A required periodic SimConnect event has not been received within the expected time window — ensure IntervalUpdate() is being called regularly (at least once per second)
TMPR_009Authentication checksum invalidRaised by AssureAuthenticated1-5() or Integrity1-5(). The authentication state checksum does not match the expected value — this may indicate the authentication result was externally modified
TMPR_010Authentication mirror value invalidRaised by AssureAuthenticated1-5() or Integrity1-5(). The authentication state mirror value does not match the expected value — this may indicate the authentication result was externally modified
TMPR_011Authentication cross-validation failedRaised by AssureAuthenticated1-5() or Integrity1-5(). A cross-validation between authentication state values detected a mismatch — this may indicate selective memory modification
TMPR_022Internal state validation failed (periodic)Raised by IntervalUpdate(). A periodic integrity check detected an inconsistency in internal DRM state — this may indicate memory was externally modified between checks
TMPR_023Authentication value mismatch (periodic)Raised by IntervalUpdate(). A periodic integrity check found that authentication state values do not agree — this may indicate selective memory modification between checks
TMPR_025Checkpoint sequence staleRaised by IntervalUpdate(). The internal checkpoint sequence has not advanced as expected — ensure IntervalUpdate() is being called regularly (at least once per second)
TMPR_026Authentication cross-validation failed (periodic)Raised by IntervalUpdate(). A periodic cross-validation between authentication state values detected a mismatch — this may indicate selective memory modification
TMPR_027Periodic event never receivedRaised by IntervalUpdate() after ~120 seconds. A required periodic SimConnect event has never been received since authentication — ensure IntervalUpdate() is being called regularly (at least once per second)
TMPR_028Signature proof mismatchRaised by IntervalUpdate() or during authentication. The DRM module's internal signature proof does not match the expected value — this may indicate the authentication verification was bypassed

Note: Runtime integrity codes (TMPR_006–011, TMPR_022–028) are expected only when memory is externally modified. If you see these during normal development, check that no other module is writing to the DRM module's memory space.

SimConnect Communication

These errors relate to the DRM module's SimConnect connection and event handling.

CodeDescriptionTrigger Condition
TMPR_012SimConnect data write failedRaised internally during SimConnect event handling. The DRM module could not write throttle control data via SimConnect — check that your aircraft's SimConnect configuration is correct and not conflicting with the DRM module
TMPR_013SimConnect connection failedRaised during Builder::build(). The DRM module could not open a SimConnect connection — check that the simulator is running and that the SimConnect connection limit has not been reached
TMPR_014SimConnect event subscription failedRaised internally during SimConnect event handling. The DRM module could not subscribe to a required periodic event — check for conflicting event subscriptions in your gauge code
TMPR_015SimConnect dispatch failedRaised during Builder::build() or during SimConnect event handling. The DRM module's SimConnect dispatch call failed — SimConnect may have been disconnected or the dispatch loop was interrupted
TMPR_016External tamper event receivedRaised by the CommBus receiver. The DRM module received a tamper notification from another component in the aircraft package via the CommBus system
TMPR_017Periodic event stale (deprecated)Deprecated — this code is equivalent to TMPR_008. It may appear in older session logs but is no longer emitted by current library versions

File Hash Verification

These errors are raised when file integrity verification (via Builder::addFileHash()) detects a mismatch or configuration issue.

CodeDescriptionTrigger Condition
TMPR_019File hash mismatchRaised during authentication. A registered file's hash does not match the expected value — the file may have been modified after release. Update the hash via Builder::addFileHash() if the file was intentionally changed
TMPR_020WASM path emptyRaised during authentication. The .wasmPath() builder option is empty or was not set — this is required when using addFileHash() for file integrity verification
TMPR_021File hash computation failedRaised during authentication. The DRM module could not read or compute the hash of a registered file — check that the file path passed to addFileHash() is correct and the file exists in the package

Authentication Flow

The auth4 endpoint validates requests in this order:

  1. User-Agent validation → AUTH_001
  2. Required fields check → AUTH_002
  3. API key lookup → AUTH_003 / AUTH_004
  4. Payload decryption → AUTH_005
  5. Activation key lookup → AUTHZ_001
  6. Rate limiting → RATE_001 / RATE_002
  7. Key status check → AUTHZ_002 / AUTHZ_003
  8. User block check → AUTHZ_004
  9. File hash validation → AUTHZ_005 / AUTHZ_006
  10. User switch check → AUTHZ_007 / AUTHZ_009
  11. Success → HTTP 200

Tip: When troubleshooting authentication issues, check the error code in the session history to identify exactly where the authentication failed.