fluxer/packages/constants/src/ApiErrorCodesDescriptions.tsx

310 lines
18 KiB
TypeScript

/*
* Copyright (C) 2026 Fluxer Contributors
*
* This file is part of Fluxer.
*
* Fluxer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fluxer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
*/
import type {APIErrorCodes} from '@fluxer/constants/src/ApiErrorCodes';
export const APIErrorCodesDescriptions: Record<keyof typeof APIErrorCodes, string> = {
ACCESS_DENIED: 'Access to this resource is denied',
ACCOUNT_DISABLED: 'This account has been disabled',
APPLICATION_NOT_FOUND: 'Application not found',
APPLICATION_NOT_OWNED: 'You do not own this application',
BAD_GATEWAY: 'Bad gateway',
BAD_REQUEST: 'Bad request',
BLUESKY_OAUTH_AUTHORIZATION_FAILED: 'The Bluesky handle could not be resolved for authorisation',
BLUESKY_OAUTH_CALLBACK_FAILED: 'The Bluesky OAuth callback could not be processed',
BLUESKY_OAUTH_NOT_ENABLED: 'Bluesky OAuth connections are not enabled on this instance',
BLUESKY_OAUTH_SESSION_EXPIRED: 'The Bluesky OAuth session has expired or been revoked',
BLUESKY_OAUTH_STATE_INVALID: 'The OAuth state parameter is invalid or expired',
ACCOUNT_SCHEDULED_FOR_DELETION: 'This account is scheduled for deletion',
ACCOUNT_SUSPENDED_PERMANENTLY: 'This account has been permanently suspended',
ACCOUNT_SUSPENDED_TEMPORARILY: 'This account has been temporarily suspended',
ACCOUNT_SUSPICIOUS_ACTIVITY: 'Suspicious activity detected on this account',
ACCOUNT_TOO_NEW_FOR_GUILD: 'Account is too new to join this guild',
ACLS_MUST_BE_NON_EMPTY: 'Access control list must not be empty',
ADMIN_API_KEY_NOT_FOUND: 'Admin API key was not found',
ALREADY_FRIENDS: 'You are already friends with this user',
AUDIT_LOG_INDEXING: 'Audit log is currently being indexed',
BOTS_CANNOT_SEND_FRIEND_REQUESTS: 'Bots cannot send friend requests',
BOT_ALREADY_IN_GUILD: 'Bot is already in this guild',
BOT_APPLICATION_NOT_FOUND: 'Bot application not found',
BOT_IS_PRIVATE: 'This bot is private and can only be invited by the owner',
BOT_USER_AUTH_ENDPOINT_ACCESS_DENIED: 'Bot users cannot access this authentication endpoint',
BOT_USER_AUTH_SESSION_CREATION_DENIED: 'Bot users cannot create authentication sessions',
BOT_USER_NOT_FOUND: 'Bot user not found',
BOT_USER_GENERATION_FAILED: 'Failed to generate bot user',
CALL_ALREADY_EXISTS: 'A call already exists in this channel',
CANNOT_EDIT_OTHER_USER_MESSAGE: 'You cannot edit another user message',
CANNOT_EXECUTE_ON_DM: 'This action cannot be executed on a DM channel',
CANNOT_MODIFY_SYSTEM_WEBHOOK: 'System webhooks cannot be modified',
CANNOT_MODIFY_VOICE_STATE: 'Cannot modify voice state',
CANNOT_REDEEM_PLUTONIUM_WITH_VISIONARY: 'Cannot redeem plutonium while having Visionary subscription',
CANNOT_REPORT_OWN_GUILD: 'You cannot report your own guild',
CANNOT_REPORT_OWN_MESSAGE: 'You cannot report your own message',
CANNOT_REPORT_YOURSELF: 'You cannot report yourself',
CANNOT_SEND_EMPTY_MESSAGE: 'Cannot send an empty message',
CANNOT_SEND_FRIEND_REQUEST_TO_BLOCKED_USER: 'Cannot send friend request to a blocked user',
CANNOT_SEND_FRIEND_REQUEST_TO_SELF: 'Cannot send friend request to yourself',
CANNOT_SEND_MESSAGES_IN_NON_TEXT_CHANNEL: 'Cannot send messages in a non-text channel',
CANNOT_SEND_MESSAGES_TO_USER: 'Cannot send messages to this user',
CANNOT_TRANSFER_OWNERSHIP_TO_BOT: 'Guild ownership cannot be transferred to a bot',
CANNOT_SHRINK_RESERVED_SLOTS: 'Cannot shrink reserved slots',
CAPTCHA_REQUIRED: 'Captcha verification is required',
CHANNEL_INDEXING: 'Channel is currently being indexed',
CHUNKED_UPLOAD_CHUNK_INDEX_OUT_OF_RANGE: 'Chunk index is out of range for this upload',
CHUNKED_UPLOAD_INCOMPLETE: 'Not all chunks have been uploaded',
CHUNKED_UPLOAD_NOT_FOUND: 'Chunked upload session was not found',
CHUNKED_UPLOAD_NOT_OWNED: 'You do not own this chunked upload session',
COMMUNICATION_DISABLED: 'You are timed out in this guild',
CONNECTION_ALREADY_EXISTS: 'A connection of this type with this identifier already exists',
CONNECTION_INITIATION_TOKEN_INVALID: 'The connection initiation token is invalid or has expired',
CONNECTION_INVALID_IDENTIFIER: 'The connection identifier is invalid',
CONNECTION_INVALID_TYPE: 'The connection type is not supported',
CONNECTION_LIMIT_REACHED: 'Maximum number of connections reached',
CONNECTION_NOT_FOUND: 'Unknown connection',
CONNECTION_VERIFICATION_FAILED: 'Connection verification failed',
CONFLICT: 'Resource conflict',
CONTENT_BLOCKED: 'Content was blocked',
CREATION_FAILED: 'Resource creation failed',
CSAM_SCAN_FAILED: 'CSAM scan service error',
CSAM_SCAN_PARSE_ERROR: 'Failed to parse CSAM scan result',
CSAM_SCAN_SUBSCRIPTION_ERROR: 'CSAM scan subscription error',
CSAM_SCAN_TIMEOUT: 'CSAM scan request timed out',
DECRYPTION_FAILED: 'Failed to decrypt data',
DELETION_FAILED: 'Resource deletion failed',
DISCOVERY_ALREADY_APPLIED: 'This community has already applied for discovery',
DISCOVERY_APPLICATION_ALREADY_REVIEWED: 'This discovery application has already been reviewed',
DISCOVERY_APPLICATION_NOT_FOUND: 'Discovery application not found',
DISCOVERY_DESCRIPTION_REQUIRED: 'A description is required for discovery',
DISCOVERY_DISABLED: 'Discovery is not available on this instance',
DISCOVERY_INSUFFICIENT_MEMBERS: 'Community does not meet the minimum member count for discovery',
DISCOVERY_INVALID_CATEGORY: 'Invalid discovery category',
DISCOVERY_NOT_DISCOVERABLE: 'This community is not listed in discovery',
DISCRIMINATOR_REQUIRED: 'A discriminator is required',
DONATION_AMOUNT_INVALID: 'Invalid donation amount',
DONATION_MAGIC_LINK_EXPIRED: 'Donation magic link has expired',
DONATION_MAGIC_LINK_INVALID: 'Invalid donation magic link',
DONATION_MAGIC_LINK_USED: 'Donation magic link has already been used',
DONOR_NOT_FOUND: 'Donor was not found',
EMPTY_ENCRYPTED_BODY: 'Encrypted body is empty',
ENCRYPTION_FAILED: 'Failed to encrypt data',
EMAIL_SERVICE_NOT_TESTABLE: 'Email service is not in testable mode',
EMAIL_VERIFICATION_REQUIRED: 'Email verification is required',
EXPLICIT_CONTENT_CANNOT_BE_SENT: 'Explicit content cannot be sent in this channel',
FEATURE_NOT_AVAILABLE_SELF_HOSTED: 'This feature is not available on self-hosted instances',
FEATURE_TEMPORARILY_DISABLED: 'This feature is temporarily disabled',
FILE_SIZE_TOO_LARGE: 'File size exceeds the maximum allowed',
FORBIDDEN: 'Access forbidden',
FRIEND_REQUEST_BLOCKED: 'Friend request was blocked',
GATEWAY_TIMEOUT: 'Gateway timeout',
GENERAL_ERROR: 'A general error occurred',
GONE: 'Resource no longer exists',
GIFT_CODE_ALREADY_REDEEMED: 'This gift code has already been redeemed',
GUILD_PHONE_VERIFICATION_REQUIRED: 'Phone verification is required to join this guild',
GUILD_VERIFICATION_REQUIRED: 'Account verification is required to interact in this guild',
HANDOFF_CODE_EXPIRED: 'Handoff code has expired',
HARVEST_EXPIRED: 'Data harvest request has expired',
HARVEST_FAILED: 'Data harvest failed',
HARVEST_NOT_READY: 'Data harvest is not yet ready',
HARVEST_ON_COOLDOWN: 'Data harvest is on cooldown',
HTTP_GET_AUTHORIZE_NOT_SUPPORTED: 'HTTP GET authorize is not supported',
INSTANCE_VERSION_MISMATCH: 'Instance version mismatch',
INTERNAL_SERVER_ERROR: 'Internal server error',
INVALID_ACLS_FORMAT: 'Invalid access control list format',
INVALID_API_ORIGIN: 'Invalid API origin',
INVALID_AUTH_TOKEN: 'Invalid authentication token',
INVALID_BOT_FLAG: 'Invalid bot flag',
INVALID_CAPTCHA: 'Invalid captcha response',
INVALID_CHANNEL_TYPE_FOR_CALL: 'Invalid channel type for call',
INVALID_CHANNEL_TYPE: 'Invalid channel type',
INVALID_CLIENT: 'Invalid OAuth2 client',
INVALID_CLIENT_SECRET: 'Invalid client secret',
INVALID_DSA_REPORT_TARGET: 'Invalid DSA report target',
INVALID_DSA_TICKET: 'Invalid DSA ticket',
INVALID_DSA_VERIFICATION_CODE: 'Invalid DSA verification code',
INVALID_DECRYPTED_JSON: 'Invalid JSON in decrypted data',
INVALID_EPHEMERAL_KEY: 'Invalid ephemeral key',
INVALID_FLAGS_FORMAT: 'Invalid flags format',
INVALID_FORM_BODY: 'Invalid request body format',
INVALID_IV: 'Invalid initialization vector',
INVALID_GRANT: 'Invalid OAuth2 grant',
INVALID_HANDOFF_CODE: 'Invalid handoff code',
INVALID_PACK_TYPE: 'Invalid pack type',
INVALID_PERMISSIONS_INTEGER: 'Invalid permissions value',
INVALID_PERMISSIONS_NEGATIVE: 'Permissions value cannot be negative',
INVALID_PHONE_NUMBER: 'Invalid phone number',
INVALID_PHONE_VERIFICATION_CODE: 'Invalid phone verification code',
INVALID_REDIRECT_URI: 'Invalid redirect URI',
INVALID_REQUEST: 'Invalid request',
INVALID_RESPONSE_TYPE_FOR_NON_BOT: 'Invalid response type for non-bot application',
INVALID_SCOPE: 'Invalid OAuth2 scope',
INVALID_STREAM_KEY_FORMAT: 'Invalid stream key format',
INVALID_STREAM_THUMBNAIL_PAYLOAD: 'Invalid stream thumbnail payload',
INVALID_SUDO_TOKEN: 'Invalid sudo token',
INVALID_SUSPICIOUS_FLAGS_FORMAT: 'Invalid suspicious flags format',
INVALID_SYSTEM_FLAG: 'Invalid system flag',
INVALID_TIMESTAMP: 'Invalid timestamp',
INVALID_TOKEN: 'Invalid token',
INVALID_WEBAUTHN_AUTHENTICATION_COUNTER: 'Invalid WebAuthn authentication counter',
INVALID_WEBAUTHN_CREDENTIAL_COUNTER: 'Invalid WebAuthn credential counter',
INVALID_WEBAUTHN_CREDENTIAL: 'Invalid WebAuthn credential',
INVALID_WEBAUTHN_PUBLIC_KEY_FORMAT: 'Invalid WebAuthn public key format',
INVITES_DISABLED: 'Invites are disabled for this guild',
IP_AUTHORIZATION_REQUIRED: 'IP address authorization is required',
IP_AUTHORIZATION_RESEND_COOLDOWN: 'IP authorization email resend is on cooldown',
IP_AUTHORIZATION_RESEND_LIMIT_EXCEEDED: 'IP authorization email resend limit exceeded',
IP_BANNED: 'This IP address has been banned',
MAX_ANIMATED_EMOJIS: 'Maximum animated emojis limit reached',
MAX_BOOKMARKS: 'Maximum bookmarks limit reached',
MAX_CATEGORY_CHANNELS: 'Maximum category channels limit reached',
MAX_EMOJIS: 'Maximum emojis limit reached',
MAX_FAVORITE_MEMES: 'Maximum favourite memes limit reached',
MAX_FRIENDS: 'Maximum friends limit reached',
MAX_GROUP_DM_RECIPIENTS: 'Maximum group DM recipients limit reached',
MAX_GROUP_DMS: 'Maximum group DMs limit reached',
MAX_GUILD_CHANNELS: 'Maximum guild channels limit reached',
MAX_GUILD_MEMBERS: 'Maximum guild members limit reached',
MAX_GUILD_ROLES: 'Maximum guild roles limit reached',
MAX_GUILDS: 'Maximum guilds limit reached',
MAX_INVITES: 'Maximum invites limit reached',
MAX_PACK_EXPRESSIONS: 'Maximum pack expressions limit reached',
MAX_PACKS: 'Maximum packs limit reached',
MAX_PINS_PER_CHANNEL: 'Maximum pins per channel limit reached',
MESSAGE_TOTAL_ATTACHMENT_SIZE_TOO_LARGE: 'Total attachment size per message is too large',
MAX_REACTIONS: 'Maximum reactions limit reached',
MAX_STICKERS: 'Maximum stickers limit reached',
MAX_WEBHOOKS_PER_CHANNEL: 'Maximum webhooks per channel limit reached',
MAX_WEBHOOKS_PER_GUILD: 'Maximum webhooks per guild limit reached',
MAX_WEBHOOKS: 'Maximum webhooks limit reached',
NCMEC_ALREADY_SUBMITTED: 'NCMEC report has already been submitted',
NCMEC_SUBMISSION_FAILED: 'NCMEC report submission failed',
MEDIA_METADATA_ERROR: 'Error processing media metadata',
METHOD_NOT_ALLOWED: 'Method not allowed',
MISSING_ACCESS: 'Missing access to this resource',
MISSING_ACL: 'Missing access control list entry',
MISSING_AUTHORIZATION: 'Missing authorization header',
MISSING_CLIENT_SECRET: 'Missing client secret',
MISSING_EPHEMERAL_KEY: 'Missing ephemeral key',
MISSING_IV: 'Missing initialization vector',
MISSING_OAUTH_ADMIN_SCOPE: 'Missing OAuth admin scope',
MISSING_OAUTH_FIELDS: 'Missing required OAuth fields',
MISSING_OAUTH_SCOPE: 'Missing required OAuth scope',
MISSING_PERMISSIONS: 'Missing required permissions',
MISSING_REDIRECT_URI: 'Missing redirect URI',
NO_ACTIVE_CALL: 'No active call in this channel',
NO_ACTIVE_SUBSCRIPTION: 'No active subscription',
NOT_A_BOT_APPLICATION: 'Application is not a bot',
NOT_FOUND: 'Resource not found',
NOT_IMPLEMENTED: 'Feature not implemented',
NO_PASSKEYS_REGISTERED: 'No passkeys registered for this account',
NO_PENDING_DELETION: 'No pending deletion for this account',
NO_USERS_WITH_FLUXERTAG_EXIST: 'No users with this Fluxertag exist',
NO_VISIONARY_SLOTS_AVAILABLE: 'No Visionary slots available',
NOT_FRIENDS_WITH_USER: 'You are not friends with this user',
NOT_OWNER_OF_ADMIN_API_KEY: 'You are not the owner of this admin API key',
NSFW_CONTENT_AGE_RESTRICTED: 'NSFW content is age restricted',
PACK_ACCESS_DENIED: 'Access to this pack is denied',
PASSKEY_AUTHENTICATION_FAILED: 'Passkey authentication failed',
PASSKEYS_DISABLED: 'Passkeys are disabled',
PHONE_ALREADY_USED: 'This phone number is already in use',
PHONE_RATE_LIMIT_EXCEEDED: 'Phone verification rate limit exceeded',
PHONE_REQUIRED_FOR_SMS_MFA: 'Phone number required for SMS MFA',
PHONE_VERIFICATION_REQUIRED: 'Phone verification is required',
PREMIUM_PURCHASE_BLOCKED: 'Premium purchase is blocked',
PREVIEW_MUST_BE_JPEG: 'Preview image must be JPEG format',
PROCESSING_FAILED: 'Processing failed',
RATE_LIMITED: 'You are being rate limited',
REDIRECT_URI_REQUIRED_FOR_NON_BOT: 'Redirect URI required for non-bot application',
REPORT_ALREADY_RESOLVED: 'This report has already been resolved',
REPORT_BANNED: 'You are banned from submitting reports',
RESPONSE_VALIDATION_ERROR: 'Response validation error',
SERVICE_UNAVAILABLE: 'Service temporarily unavailable',
SESSION_TOKEN_MISMATCH: 'Session token mismatch',
SLOWMODE_RATE_LIMITED: 'You are being rate limited by slowmode',
SMS_MFA_NOT_ENABLED: 'SMS MFA is not enabled',
SMS_MFA_REQUIRES_TOTP: 'SMS MFA requires TOTP to be enabled first',
SMS_VERIFICATION_UNAVAILABLE: 'SMS verification is unavailable',
SSO_REQUIRED: 'Single sign-on is required',
STREAM_KEY_CHANNEL_MISMATCH: 'Stream key does not match channel',
STREAM_KEY_SCOPE_MISMATCH: 'Stream key scope mismatch',
STREAM_THUMBNAIL_PAYLOAD_EMPTY: 'Stream thumbnail payload is empty',
STRIPE_ERROR: 'Stripe payment error',
STRIPE_GIFT_REDEMPTION_IN_PROGRESS: 'Gift redemption already in progress',
STRIPE_INVALID_PRODUCT: 'Invalid Stripe product',
STRIPE_INVALID_PRODUCT_CONFIGURATION: 'Invalid Stripe product configuration',
STRIPE_NO_ACTIVE_SUBSCRIPTION: 'No active Stripe subscription',
STRIPE_NO_PURCHASE_HISTORY: 'No Stripe purchase history',
STRIPE_NO_SUBSCRIPTION: 'No Stripe subscription',
STRIPE_PAYMENT_NOT_AVAILABLE: 'Stripe payment not available',
STRIPE_SUBSCRIPTION_ALREADY_CANCELING: 'Subscription is already being cancelled',
STRIPE_SUBSCRIPTION_NOT_CANCELING: 'Subscription is not being cancelled',
STRIPE_SUBSCRIPTION_PERIOD_END_MISSING: 'Subscription period end date is missing',
STRIPE_WEBHOOK_NOT_AVAILABLE: 'Stripe webhook not available',
STRIPE_WEBHOOK_SIGNATURE_INVALID: 'Invalid Stripe webhook signature',
STRIPE_WEBHOOK_SIGNATURE_MISSING: 'Missing Stripe webhook signature',
SUDO_MODE_REQUIRED: 'Sudo mode is required for this action',
TAG_ALREADY_TAKEN: 'This tag is already taken',
TEMPORARY_INVITE_REQUIRES_PRESENCE: 'Temporary invite requires presence tracking',
TEST_HARNESS_DISABLED: 'Test harness is disabled',
TEST_HARNESS_FORBIDDEN: 'Test harness access is forbidden',
TWO_FA_NOT_ENABLED: 'Two-factor authentication is not enabled',
TWO_FACTOR_REQUIRED: 'Two-factor authentication is required',
UNAUTHORIZED: 'Unauthorized',
UNCLAIMED_ACCOUNT_CANNOT_ACCEPT_FRIEND_REQUESTS: 'Unclaimed accounts cannot accept friend requests',
UNCLAIMED_ACCOUNT_CANNOT_ADD_REACTIONS: 'Unclaimed accounts cannot add reactions',
UNCLAIMED_ACCOUNT_CANNOT_CREATE_APPLICATIONS: 'Unclaimed accounts cannot create applications',
UNCLAIMED_ACCOUNT_CANNOT_JOIN_GROUP_DMS: 'Unclaimed accounts cannot join group DMs',
UNCLAIMED_ACCOUNT_CANNOT_JOIN_ONE_ON_ONE_VOICE_CALLS: 'Unclaimed accounts cannot join one-on-one voice calls',
UNCLAIMED_ACCOUNT_CANNOT_JOIN_VOICE_CHANNELS: 'Unclaimed accounts cannot join voice channels',
UNCLAIMED_ACCOUNT_CANNOT_MAKE_PURCHASES: 'Unclaimed accounts cannot make purchases',
UNCLAIMED_ACCOUNT_CANNOT_SEND_DIRECT_MESSAGES: 'Unclaimed accounts cannot send direct messages',
UNCLAIMED_ACCOUNT_CANNOT_SEND_FRIEND_REQUESTS: 'Unclaimed accounts cannot send friend requests',
UNCLAIMED_ACCOUNT_CANNOT_SEND_MESSAGES: 'Unclaimed accounts cannot send messages',
UNKNOWN_CHANNEL: 'Unknown channel',
UNKNOWN_EMOJI: 'Unknown emoji',
UNKNOWN_FAVORITE_MEME: 'Unknown favourite meme',
UNKNOWN_GIFT_CODE: 'Unknown gift code',
UNKNOWN_GUILD: 'Unknown guild',
UNKNOWN_HARVEST: 'Unknown data harvest',
UNKNOWN_INVITE: 'Unknown invite',
UNKNOWN_MEMBER: 'Unknown member',
UNKNOWN_MESSAGE: 'Unknown message',
UNKNOWN_PACK: 'Unknown pack',
UNKNOWN_REPORT: 'Unknown report',
UNKNOWN_ROLE: 'Unknown role',
UNKNOWN_STICKER: 'Unknown sticker',
UNKNOWN_SUSPICIOUS_FLAG: 'Unknown suspicious flag',
UNKNOWN_USER_FLAG: 'Unknown user flag',
UNKNOWN_USER: 'Unknown user',
UNKNOWN_VOICE_REGION: 'Unknown voice region',
UNKNOWN_VOICE_SERVER: 'Unknown voice server',
UNKNOWN_WEBAUTHN_CREDENTIAL: 'Unknown WebAuthn credential',
UNKNOWN_APPLICATION: 'Unknown application',
UNKNOWN_WEBHOOK: 'Unknown webhook',
UNSUPPORTED_RESPONSE_TYPE: 'Unsupported response type',
UPDATE_FAILED: 'Resource update failed',
USER_BANNED_FROM_GUILD: 'User is banned from this guild',
USER_IP_BANNED_FROM_GUILD: 'User IP is banned from this guild',
USER_NOT_IN_VOICE: 'User is not in a voice channel',
USER_OWNS_GUILDS: 'User owns guilds and cannot perform this action',
USERNAME_NOT_AVAILABLE: 'Username is not available',
VALIDATION_ERROR: 'Validation error',
VOICE_CHANNEL_FULL: 'Voice channel is full',
WEBAUTHN_CREDENTIAL_LIMIT_REACHED: 'WebAuthn credential limit reached',
};