Reference12 Codes

Error Codes

Complete reference for all 12 canonical Taicket MCP error codes emitted by sanitizeMcpError, including HTTP statuses, trigger conditions, and recovery paths.

Canonical error code catalog

Every failure returned by Taicket MCP maps to one of 12 stable error codes in mcp/src/security/errors.ts. Clients should branch on error.code programmatically while surfacing error.message directly to the Discord server manager.

Error CodeHTTP / Tool StatusTrigger ConditionRecommended Resolution
UNAUTHORIZED401Missing, malformed, expired, revoked, or wrong-resource Bearer token.Refresh the OAuth token, re-authenticate via OAuth 2.1, or generate a new PAT in /account.
FORBIDDEN403Missing required scope, guild outside token allowedGuildIds, caller failed live Discord RBAC (e.g. Temp Admin on Server Settings or non-Owner on Anti-Nuke), or user/guild is on BotBlacklist.Check granted scopes and server allowlist in /account or verify the caller Discord role permissions.
TIER_UPGRADE_REQUIRED403 (Tool Error)Requested feature or cap exceeds the server active Free, Pro, or Enterprise subscription across the 18 audited surfaces.Direct the server manager to upgrade at https://taicket.xyz/dashboard/{guildId}/premium or adjust values within current tier caps.
VALIDATION_ERROR400 (Tool Error)Invalid Zod input payload, malformed Discord snowflake, unsafe regex (ReDoS guard), unsafe role delegation (isRoleSafeForDelegation), or blocked private/SSRF external media URL.Fix the invalid field identified in error.details and retry.
CROSS_GUILD_RESOURCE400 / 403 (Tool Error)Supplied channel, category, or role snowflake does not belong to the authorized target guildId.Call get_server_topology for the target guildId and select a channel or role belonging to that server.
CONFIRMATION_REQUIRED409 (Tool Error)apply_setup called without confirmed: true, or missing/invalid/expired single-use confirmationToken.Run preview_setup (or mode="preview"), obtain user confirmation, and pass the valid confirmationToken before the 15-minute expiry.
HUMAN_APPROVAL_REQUIRED409 (Tool Error)Destructive deletion or structural Discord auto-setup plan has not yet been approved by the human user in a browser at /oauth/approve-action?id=<planId>.Present approvalUrl to the server manager to sign in and approve in their browser, then call apply_setup again.
RATE_LIMITED429Caller exceeded per-user sliding windows (60 read, 20 write, 10 deploy, or 5 destructive per minute) or Nginx edge limits.Wait for retryAfterSeconds with jittered backoff before retrying.
DISCORD_API_ERROR502 / 503 (Tool Error)Discord REST API v10 rejected the action (e.g. missing bot channel permissions 50013, bot not installed in guild, or upstream Discord rate limit).Verify Taicket bot presence and required channel/role permissions using get_discord_servers or get_server_topology.
NOT_FOUND404 (Tool Error)Target guild, panelId, planId, custom command, rule, or snippet does not exist (or preview plan expired after 15m).Verify the resource identifier with get_server_configuration or generate a fresh preview_setup plan.
DASHBOARD_ONLY403 (Tool Error)Operation is permanently restricted to taicket.xyz (Temp Admin delegation, Anti-Nuke Trusted Staff/Lockdown/Backup Restore, live member actions, or billing/promo writes).Guide the user to the corresponding page on https://taicket.xyz or native Discord bot commands.
INTERNAL_ERROR500Unexpected server, database, or serialization error scrubbed by sanitizeMcpError.Retry with backoff; provide requestId to Taicket support if the error persists.

Example error payloads

TIER_UPGRADE_REQUIRED payloadjson
{
  "ok": false,
  "error": {
    "code": "TIER_UPGRADE_REQUIRED",
    "message": "JARVIS Daily Auditor requires an Enterprise plan on this server.",
    "currentTier": "pro",
    "requiredTier": "enterprise",
    "upgradeUrl": "https://taicket.xyz/dashboard/123456789012345678/premium"
  }
}
DASHBOARD_ONLY payloadjson
{
  "ok": false,
  "error": {
    "code": "DASHBOARD_ONLY",
    "message": "Managing Anti-Nuke Trusted Staff and Emergency Lockdown is only available directly on the Taicket web dashboard.",
    "dashboardUrl": "https://taicket.xyz/dashboard/123456789012345678/antinuke"
  }
}

Related documentation