Skip to main content

neptunium_http/error/
error_code.rs

1use serde::Deserialize;
2
3#[expect(clippy::doc_markdown)]
4#[derive(Deserialize, Copy, Clone, Debug, PartialEq, Eq)]
5#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
6pub enum ApiErrorCode {
7    /// Access to this resource is denied.
8    AccessDenied,
9    /// This account has been disabled.
10    AccountDisabled,
11    /// This account is scheduled for deletion.
12    AccountScheduledForDeletion,
13    /// This account has been permanently suspended.
14    AccountSuspendedPermanently,
15    /// This account has been temporarily suspended.
16    AccountSuspendedTemporarily,
17    /// Suspicious activity detected on this account.
18    AccountSuspiciousActivity,
19    /// Account is too new to join this guild.
20    AccountTooNewForGuild,
21    /// Access control list must not be empty.
22    AclsMustBeNonEmpty,
23    /// Admin API key was not found.
24    AdminApiKeyNotFound,
25    /// You are already friends with this user.
26    AlreadyFriends,
27    /// Audit log is currently being indexed.
28    AuditLogIndexing,
29    /// Bots cannot send friend requests.
30    BotsCannotSendFriendRequests,
31    /// Bot users cannot access this authentication endpoint.
32    BotUserAuthEndpointAccessDenied,
33    /// Bot users cannot create authentication sessions.
34    BotUserAuthSessionCreationDenied,
35    /// A call already exists in this channel.
36    CallAlreadyExists,
37    /// You cannot edit another user message.
38    CannotEditOtherUserMessage,
39    /// This action cannot be executed on a DM channel.
40    CannotExecuteOnDm,
41    /// System webhooks cannot be modified.
42    CannotModifySystemWebhook,
43    /// Cannot modify voice state.
44    CannotModifyVoiceState,
45    /// Cannot redeem plutonium while having Visionary subscription.
46    CannotRedeemPlutoniumWithVisionary,
47    /// You cannot report your own guild.
48    CannotReportOwnGuild,
49    /// You cannot report your own message.
50    CannotReportOwnMessage,
51    /// You cannot report yourself.
52    CannotReportYourself,
53    /// Cannot send an empty message.
54    CannotSendEmptyMessage,
55    /// Cannot send friend request to a blocked user.
56    CannotSendFriendRequestToBlockedUser,
57    /// Cannot send friend request to yourself.
58    CannotSendFriendRequestToSelf,
59    /// Cannot send messages in a non-text channel.
60    CannotSendMessagesInNonTextChannel,
61    /// Cannot send messages to this user.
62    CannotSendMessagesToUser,
63    /// Cannot shrink reserved slots.
64    CannotShrinkReservedSlots,
65    /// Captcha verification is required.
66    CaptchaRequired,
67    /// Channel is currently being indexed.
68    ChannelIndexing,
69    /// You are timed out in this guild.
70    CommunicationDisabled,
71    /// Content was blocked.
72    ContentBlocked,
73    /// Resource creation failed.
74    CreationFailed,
75    /// Resource deletion failed.
76    DeletionFailed,
77    /// A discriminator is required.
78    DiscriminatorRequired,
79    /// Email service is not in testable mode.
80    EmailServiceNotTestable,
81    /// Email verification is required.
82    EmailVerificationRequired,
83    /// Explicit content cannot be sent in this channel.
84    ExplicitContentCannotBeSent,
85    /// This feature is temporarily disabled.
86    FeatureTemporarilyDisabled,
87    /// File size exceeds the maximum allowed.
88    FileSizeTooLarge,
89    /// Friend request was blocked.
90    FriendRequestBlocked,
91    /// A general error occurred.
92    GeneralError,
93    /// This gift code has already been redeemed.
94    GiftCodeAlreadyRedeemed,
95    /// Phone verification is required to join this guild.
96    GuildPhoneVerificationRequired,
97    /// Account verification is required to interact in this guild.
98    GuildVerificationRequired,
99    /// Handoff code has expired.
100    HandoffCodeExpired,
101    /// Data harvest request has expired.
102    HarvestExpired,
103    /// Data harvest failed.
104    HarvestFailed,
105    /// Data harvest is not yet ready.
106    HarvestNotReady,
107    /// Data harvest is on cooldown.
108    HarvestOnCooldown,
109    /// HTTP GET authorize is not supported.
110    HttpGetAuthorizeNotSupported,
111    /// Instance version mismatch.
112    InstanceVersionMismatch,
113    /// Invalid access control list format.
114    InvalidAclsFormat,
115    /// Invalid API origin.
116    InvalidApiOrigin,
117    /// Invalid authentication token.
118    InvalidAuthToken,
119    /// Invalid bot flag.
120    InvalidBotFlag,
121    /// Invalid captcha response.
122    InvalidCaptcha,
123    /// Invalid channel type for call.
124    InvalidChannelTypeForCall,
125    /// Invalid channel type.
126    InvalidChannelType,
127    /// Invalid OAuth2 client.
128    InvalidClient,
129    /// Invalid client secret.
130    InvalidClientSecret,
131    /// Invalid DSA report target.
132    InvalidDsaReportTarget,
133    /// Invalid DSA ticket.
134    InvalidDsaTicket,
135    /// Invalid DSA verification code.
136    InvalidDsaVerificationCode,
137    /// Invalid flags format.
138    InvalidFlagsFormat,
139    /// Invalid request body format.
140    InvalidFormBody,
141    /// Invalid OAuth2 grant.
142    InvalidGrant,
143    /// Invalid handoff code.
144    InvalidHandoffCode,
145    /// Invalid pack type.
146    InvalidPackType,
147    /// Invalid permissions value.
148    InvalidPermissionsInteger,
149    /// Permissions value cannot be negative.
150    InvalidPermissionsNegative,
151    /// Invalid phone number.
152    InvalidPhoneNumber,
153    /// Invalid phone verification code.
154    InvalidPhoneVerificationCode,
155    /// Invalid redirect URI.
156    InvalidRedirectUri,
157    /// Invalid request.
158    InvalidRequest,
159    /// Invalid response type for non-bot application.
160    InvalidResponseTypeForNonBot,
161    /// Invalid OAuth2 scope.
162    InvalidScope,
163    /// Invalid stream key format.
164    InvalidStreamKeyFormat,
165    /// Invalid stream thumbnail payload.
166    InvalidStreamThumbnailPayload,
167    /// Invalid sudo token.
168    InvalidSudoToken,
169    /// Invalid suspicious flags format.
170    InvalidSuspiciousFlagsFormat,
171    /// Invalid system flag.
172    InvalidSystemFlag,
173    /// Invalid timestamp.
174    InvalidTimestamp,
175    /// Invalid token.
176    InvalidToken,
177    /// Invalid WebAuthn authentication counter.
178    InvalidWebauthnAuthenticationCounter,
179    /// Invalid WebAuthn credential counter.
180    InvalidWebauthnCredentialCounter,
181    /// Invalid WebAuthn credential.
182    InvalidWebauthnCredential,
183    /// Invalid WebAuthn public key format.
184    InvalidWebauthnPublicKeyFormat,
185    /// Invites are disabled for this guild.
186    InvitesDisabled,
187    /// IP address authorization is required.
188    IpAuthorizationRequired,
189    /// IP authorization email resend is on cooldown.
190    IpAuthorizationResendCooldown,
191    /// IP authorization email resend limit exceeded.
192    IpAuthorizationResendLimitExceeded,
193    /// This IP address has been banned.
194    IpBanned,
195    /// Maximum animated emojis limit reached.
196    MaxAnimatedEmojis,
197    /// Maximum beta codes limit reached.
198    MaxBetaCodesReached,
199    /// Maximum bookmarks limit reached.
200    MaxBookmarks,
201    /// Maximum category channels limit reached.
202    MaxCategoryChannels,
203    /// Maximum emojis limit reached.
204    MaxEmojis,
205    /// Maximum favourite memes limit reached.
206    MaxFavoriteMemes,
207    /// Maximum friends limit reached.
208    MaxFriends,
209    /// Maximum group DM recipients limit reached.
210    MaxGroupDmRecipients,
211    /// Maximum group DMs limit reached.
212    MaxGroupDms,
213    /// Maximum guild channels limit reached.
214    MaxGuildChannels,
215    /// Maximum guild members limit reached.
216    MaxGuildMembers,
217    /// Maximum guild roles limit reached.
218    MaxGuildRoles,
219    /// Maximum guilds limit reached.
220    MaxGuilds,
221    /// Maximum invites limit reached.
222    MaxInvites,
223    /// Maximum pack expressions limit reached.
224    MaxPackExpressions,
225    /// Maximum packs limit reached.
226    MaxPacks,
227    /// Maximum pins per channel limit reached.
228    MaxPinsPerChannel,
229    /// Maximum reactions limit reached.
230    MaxReactions,
231    /// Maximum stickers limit reached.
232    MaxStickers,
233    /// Maximum webhooks per channel limit reached.
234    MaxWebhooksPerChannel,
235    /// Maximum webhooks per guild limit reached.
236    MaxWebhooksPerGuild,
237    /// Maximum webhooks limit reached.
238    MaxWebhooks,
239    /// NCMEC report has already been submitted.
240    NcmecAlreadySubmitted,
241    /// NCMEC report submission failed.
242    NcmecSubmissionFailed,
243    /// Error processing media metadata.
244    MediaMetadataError,
245    /// Missing access to this resource.
246    MissingAccess,
247    /// Missing access control list entry.
248    MissingAcl,
249    /// Missing authorization header.
250    MissingAuthorization,
251    /// Missing client secret.
252    MissingClientSecret,
253    /// Missing OAuth admin scope.
254    MissingOauthAdminScope,
255    /// Missing required OAuth fields.
256    MissingOauthFields,
257    /// Missing required OAuth scope.
258    MissingOauthScope,
259    /// Missing required permissions.
260    MissingPermissions,
261    /// Missing redirect URI.
262    MissingRedirectUri,
263    /// No active call in this channel.
264    NoActiveCall,
265    /// No active subscription.
266    NoActiveSubscription,
267    /// No passkeys registered for this account.
268    NoPasskeysRegistered,
269    /// No pending deletion for this account.
270    NoPendingDeletion,
271    /// No users with this Fluxertag exist.
272    NoUsersWithFluxertagExist,
273    /// No Visionary slots available.
274    NoVisionarySlotsAvailable,
275    /// You are not friends with this user.
276    NotFriendsWithUser,
277    /// You are not the owner of this admin API key.
278    NotOwnerOfAdminApiKey,
279    /// NSFW content is age restricted.
280    NsfwContentAgeRestricted,
281    /// Access to this pack is denied.
282    PackAccessDenied,
283    /// Passkey authentication failed.
284    PasskeyAuthenticationFailed,
285    /// Passkeys are disabled.
286    PasskeysDisabled,
287    /// This phone number is already in use.
288    PhoneAlreadyUsed,
289    /// Phone verification rate limit exceeded.
290    PhoneRateLimitExceeded,
291    /// Phone number required for SMS MFA.
292    PhoneRequiredForSmsMfa,
293    /// Phone verification is required.
294    PhoneVerificationRequired,
295    /// Premium purchase is blocked.
296    PremiumPurchaseBlocked,
297    /// Preview image must be JPEG format.
298    PreviewMustBeJpeg,
299    /// Processing failed.
300    ProcessingFailed,
301    /// You are being rate limited.
302    RateLimited,
303    /// Redirect URI required for non-bot application.
304    RedirectUriRequiredForNonBot,
305    /// This report has already been resolved.
306    ReportAlreadyResolved,
307    /// You are banned from submitting reports.
308    ReportBanned,
309    /// Session token mismatch.
310    SessionTokenMismatch,
311    /// You are being rate limited by slowmode.
312    SlowmodeRateLimited,
313    /// SMS MFA is not enabled.
314    SmsMfaNotEnabled,
315    /// SMS MFA requires TOTP to be enabled first.
316    SmsMfaRequiresTotp,
317    /// SMS verification is unavailable.
318    SmsVerificationUnavailable,
319    /// Single sign-on is required.
320    SsoRequired,
321    /// Stream key does not match channel.
322    StreamKeyChannelMismatch,
323    /// Stream key scope mismatch.
324    StreamKeyScopeMismatch,
325    /// Stream thumbnail payload is empty.
326    StreamThumbnailPayloadEmpty,
327    /// Stripe payment error.
328    StripeError,
329    /// Gift redemption already in progress.
330    StripeGiftRedemptionInProgress,
331    /// Invalid Stripe product.
332    StripeInvalidProduct,
333    /// Invalid Stripe product configuration.
334    StripeInvalidProductConfiguration,
335    /// No active Stripe subscription.
336    StripeNoActiveSubscription,
337    /// No Stripe purchase history.
338    StripeNoPurchaseHistory,
339    /// No Stripe subscription.
340    StripeNoSubscription,
341    /// Stripe payment not available.
342    StripePaymentNotAvailable,
343    /// Subscription is already being cancelled.
344    StripeSubscriptionAlreadyCanceling,
345    /// Subscription is not being cancelled.
346    StripeSubscriptionNotCanceling,
347    /// Subscription period end date is missing.
348    StripeSubscriptionPeriodEndMissing,
349    /// Stripe webhook not available.
350    StripeWebhookNotAvailable,
351    /// Invalid Stripe webhook signature.
352    StripeWebhookSignatureInvalid,
353    /// Missing Stripe webhook signature.
354    StripeWebhookSignatureMissing,
355    /// Sudo mode is required for this action.
356    SudoModeRequired,
357    /// This tag is already taken.
358    TagAlreadyTaken,
359    /// Temporary invite requires presence tracking.
360    TemporaryInviteRequiresPresence,
361    /// Test harness is disabled.
362    TestHarnessDisabled,
363    /// Test harness access is forbidden.
364    TestHarnessForbidden,
365    /// Two-factor authentication is not enabled.
366    TwoFaNotEnabled,
367    /// Two-factor authentication is required.
368    TwoFactorRequired,
369    /// Unauthorized.
370    Unauthorized,
371    /// Unclaimed accounts cannot accept friend requests.
372    UnclaimedAccountCannotAcceptFriendRequests,
373    /// Unclaimed accounts cannot add reactions.
374    UnclaimedAccountCannotAddReactions,
375    /// Unclaimed accounts cannot create applications.
376    UnclaimedAccountCannotCreateApplications,
377    /// Unclaimed accounts cannot create beta codes.
378    UnclaimedAccountCannotCreateBetaCodes,
379    /// Unclaimed accounts cannot join group DMs.
380    UnclaimedAccountCannotJoinGroupDms,
381    /// Unclaimed accounts cannot join one-on-one voice calls.
382    UnclaimedAccountCannotJoinOneOnOneVoiceCalls,
383    /// Unclaimed accounts cannot join voice channels.
384    UnclaimedAccountCannotJoinVoiceChannels,
385    /// Unclaimed accounts cannot make purchases.
386    UnclaimedAccountCannotMakePurchases,
387    /// Unclaimed accounts cannot send direct messages.
388    UnclaimedAccountCannotSendDirectMessages,
389    /// Unclaimed accounts cannot send friend requests.
390    UnclaimedAccountCannotSendFriendRequests,
391    /// Unclaimed accounts cannot send messages.
392    UnclaimedAccountCannotSendMessages,
393    /// Unknown beta code.
394    UnknownBetaCode,
395    /// Unknown channel.
396    UnknownChannel,
397    /// Unknown emoji.
398    UnknownEmoji,
399    /// Unknown favourite meme.
400    UnknownFavoriteMeme,
401    /// Unknown gift code.
402    UnknownGiftCode,
403    /// Unknown guild.
404    UnknownGuild,
405    /// Unknown data harvest.
406    UnknownHarvest,
407    /// Unknown invite.
408    UnknownInvite,
409    /// Unknown member.
410    UnknownMember,
411    /// Unknown message.
412    UnknownMessage,
413    /// Unknown pack.
414    UnknownPack,
415    /// Unknown report.
416    UnknownReport,
417    /// Unknown role.
418    UnknownRole,
419    /// Unknown sticker.
420    UnknownSticker,
421    /// Unknown suspicious flag.
422    UnknownSuspiciousFlag,
423    /// Unknown user flag.
424    UnknownUserFlag,
425    /// Unknown user.
426    UnknownUser,
427    /// Unknown voice region.
428    UnknownVoiceRegion,
429    /// Unknown voice server.
430    UnknownVoiceServer,
431    /// Unknown WebAuthn credential.
432    UnknownWebauthnCredential,
433    /// Unknown webhook.
434    UnknownWebhook,
435    /// Unsupported response type.
436    UnsupportedResponseType,
437    /// Resource update failed.
438    UpdateFailed,
439    /// User is banned from this guild.
440    UserBannedFromGuild,
441    /// User IP is banned from this guild.
442    UserIpBannedFromGuild,
443    /// User is not in a voice channel.
444    UserNotInVoice,
445    /// User owns guilds and cannot perform this action.
446    UserOwnsGuilds,
447    /// Voice channel is full.
448    VoiceChannelFull,
449    /// WebAuthn credential limit reached.
450    WebauthnCredentialLimitReached,
451}