Enum Class ErrorResponse
- All Implemented Interfaces:
Serializable, Comparable<ErrorResponse>, Constable
Constants for easy use in
ErrorResponseException and ErrorHandler.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorResponsefromCode(int code) static ErrorResponsefromJSON(DataObject obj) intgetCode()booleanTests whether the given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()equal to this.test(Collection<ErrorResponse> responses) Provides a tests whether a given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()being one of the provided responses.test(ErrorResponse... responses) Provides a tests whether a given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()being one of the provided responses.static ErrorResponseReturns the enum constant of this class with the specified name.static ErrorResponse[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
UNKNOWN_ACCOUNT
-
UNKNOWN_APPLICATION
-
UNKNOWN_CHANNEL
-
UNKNOWN_GUILD
-
UNKNOWN_INTEGRATION
-
UNKNOWN_INVITE
-
UNKNOWN_MEMBER
-
UNKNOWN_MESSAGE
-
UNKNOWN_OVERRIDE
-
UNKNOWN_PROVIDER
-
UNKNOWN_ROLE
-
UNKNOWN_TOKEN
-
UNKNOWN_USER
-
UNKNOWN_EMOJI
-
UNKNOWN_WEBHOOK
-
UNKNOWN_WEBHOOK_SERVICE
-
UNKNOWN_SESSION
-
UNKNOWN_ASSET
-
UNKNOWN_BAN
-
UNKNOWN_SKU
-
UNKNOWN_STORE_LISTING
-
UNKNOWN_ENTITLEMENT
-
UNKNOWN_BUILD
-
UNKNOWN_LOBBY
-
UNKNOWN_BRANCH
-
UNKNOWN_STORE_DIRECTORY_LAYOUT
-
UNKNOWN_REDISTRIBUTABLE
-
UNKNOWN_GIFT_CODE
-
UNKNOWN_STREAM
-
UNKNOWN_PREMIUM_SERVER_SUBSCRIBE_COOLDOWN
-
UNKNOWN_GUILD_TEMPLATE
-
UNKNOWN_DISCOVERABLE_SERVER_CATEGORY
-
UNKNOWN_STICKER
-
UNKNOWN_INTERACTION
-
UNKNOWN_COMMAND
-
UNKNOWN_VOICE_STATE
-
UNKNOWN_COMMAND_PERMISSIONS
-
UNKNOWN_STAGE_INSTANCE
-
UNKNOWN_GUILD_MEMBER_VERIFICATION_FORM
-
UNKNOWN_GUILD_WELCOME_SCREEN
-
UNKNOWN_SCHEDULED_EVENT
-
UNKNOWN_SCHEDULED_EVENT_USER
-
UNKNOWN_TAG
-
UNKNOWN_SOUND
-
BOTS_NOT_ALLOWED
-
ONLY_BOTS_ALLOWED
-
EXPLICIT_CONTENT_CANNOT_SEND_TO_RECIPIENT
-
NOT_AUTHORIZED_PERFORM_ACTION
-
SLOWMODE_RATE_LIMIT
-
OWNER_ONLY
-
ANNOUNCEMENT_RATE_LIMIT
-
CHANNEL_WRITE_RATE_LIMIT
-
GUILD_WRITE_RATE_LIMIT
-
GUILD_EXPLICIT_CONTENT_FILTER
-
GUILD_PREMIUM_LEVEL_TOO_LOW
-
MAX_GUILDS
-
MAX_FRIENDS
-
MAX_MESSAGE_PINS
-
MAX_USERS_PER_DM
-
MAX_ROLES_PER_GUILD
-
MAX_WEBHOOKS
-
MAX_EMOJIS
-
TOO_MANY_REACTIONS
-
MAX_GROUP_DMS
-
MAX_CHANNELS
-
MAX_ATTACHMENTS
-
MAX_INVITES
-
MAX_ANIMATED_EMOJIS
-
MAX_MEMBERS
-
MAX_CATEGORIES
-
ALREADY_HAS_TEMPLATE
-
MAX_THREAD_PARTICIPANTS
-
MAX_DAILY_APPLICATION_COMMAND_CREATES
-
MAX_NON_GUILD_MEMBER_BANS
-
MAX_BAN_FETCHES
-
MAX_UNCOMPLETED_GUILD_SCHEDULED_EVENTS
-
MAX_STICKERS
-
MAX_PRUNE_REQUESTS
-
MAX_GUILD_WIDGET_UPDATES
-
MAX_SOUNDBOARD_SOUNDS
-
MAX_OLD_MESSAGE_EDITS
-
MAX_PINNED_THREADS_IN_FORUM
-
MAX_FORUM_TAGS
-
MAX_BITRATE
-
MAX_PREMIUM_EMOJIS
-
MAX_GUILD_WEBHOOKS
-
MAX_CHANNEL_OVERRIDES
-
GUILD_CHANNELS_TOO_LARGE
-
UNAUTHORIZED
-
NOT_VERIFIED
-
OPEN_DM_TOO_FAST
-
MESSAGE_SEND_TEMPORARILY_DISABLED
-
REQUEST_ENTITY_TOO_LARGE
-
FEATURE_TEMPORARILY_DISABLED
-
USER_BANNED_FROM_GUILD
-
CONNECTION_REVOKED
-
USER_NOT_CONNECTED
-
ALREADY_CROSSPOSTED
-
APPLICATION_COMMAND_NAME_ALREADY_EXISTS
-
APPLICATION_INTERACTION_FAILED
-
CANNOT_SEND_MESSAGE_IN_FORUM
-
INTERACTION_ALREADY_ACKNOWLEDGED
-
DUPLICATE_TAG_NAME
-
SERVICE_RESOURCE_RATE_LIMIT
-
MISSING_AVAILABLE_TAGS
-
FORUM_POST_TAG_REQUIRED
-
DUPLICATE_RESOURCE_ENTITLEMENT
-
MAX_FOLLOW_UP_MESSAGES_HIT
-
CLOUDFLARE_BLOCKED_REQUEST
-
MISSING_ACCESS
-
INVALID_ACCOUNT_TYPE
-
INVALID_DM_ACTION
-
EMBED_DISABLED
-
INVALID_AUTHOR_EDIT
-
EMPTY_MESSAGE
-
CANNOT_SEND_TO_USER
-
CANNOT_MESSAGE_VC
-
VERIFICATION_ERROR
-
OAUTH_NOT_BOT
-
MAX_OAUTH_APPS
-
INVALID_OAUTH_STATE
-
MISSING_PERMISSIONS
-
INVALID_TOKEN
-
NOTE_TOO_LONG
-
INVALID_BULK_DELETE
-
INVALID_MFA_LEVEL
-
INVALID_PASSWORD
-
INVALID_PIN
-
INVITE_CODE_INVALID
-
INVALID_MESSAGE_TARGET
-
INVALID_CHANNEL_TYPE
-
INVALID_OAUTH_ACCESS_TOKEN
-
MISSING_OAUTH_SCOPE
-
INVALID_WEBHOOK_TOKEN
-
INVALID_ROLE
-
INVALID_RECIPIENT
-
INVALID_BULK_DELETE_MESSAGE_AGE
-
INVALID_FORM_BODY
-
INVITE_FOR_UNKNOWN_GUILD
-
INVALID_ACTIVITY_ACTION
-
INVALID_API_VERSION
-
FILE_UPLOAD_MAX_SIZE_EXCEEDED
-
INVALID_FILE_UPLOADED
-
CANNOT_SELF_REDEEM_GIFT
-
INVALID_GUILD
-
PAYMENT_SOURCE_REQUIRED
-
CANNOT_MODIFY_SYSTEM_WEBHOOK
-
CANNOT_DELETE_CHANNEL_COMMUNITY
-
CANNOT_EDIT_STICKER_MESSAGE
-
INVALID_STICKER_SENT
-
ILLEGAL_OPERATION_ARCHIVED_THREAD
-
INVALID_THREAD_NOTIFICATION_SETTINGS
-
BEFORE_VALUE_EARLIER_THAN_THREAD_CREATION
-
INVALID_COMMUNITY_SERVER_CHANNEL_TYPE
-
INCONSISTENT_EVENT_START_ENTITY
-
SERVER_NOT_AVAILABLE_IN_YOUR_LOCATION
-
SERVER_MONETIZATION_DISABLED
-
SERVER_NOT_ENOUGH_BOOSTS
-
INVALID_REQUEST_BODY
-
INVALID_FILE
-
INVALID_FILE_TYPE
-
INVALID_FILE_EXCEEDS_MAXIMUM_LENGTH
-
OWNER_CANNOT_BE_PENDING
-
OWNER_TRANSFER_TO_BOT
-
CANNOT_RESIZE_BELOW_MAXIMUM
-
MIXED_PREMIUM_ROLES_FOR_EMOJI
-
ILLEGAL_EMOJI_CONVERSION
-
UNKNOWN_UPLOADED_FILE
-
INVALID_EMOJI
-
VOICE_MESSAGE_ADDITIONAL_CONTENT
-
VOICE_MESSAGE_TOO_MANY_AUDIO_ATTACHMENTS
-
VOICE_MESSAGE_MISSING_METADATA
-
CANNOT_EDIT_VOICE_MESSAGE
-
CANNOT_DELETE_GUILD_INTEGRATION
-
CANNOT_SEND_VOICE_EFFECT
-
CANNOT_SEND_VOICE_MESSAGE
-
USER_MUST_BE_VERIFIED
-
INVALID_FILE_DURATION
-
NO_MUTUAL_GUILDS
-
CANNOT_SEND_STICKER
-
MFA_NOT_ENABLED
-
NO_USER_WITH_TAG_EXISTS
-
REACTION_BLOCKED
-
CANNOT_SEND_SUPER_REACTION
-
APPLICATION_NOT_AVAILABLE
-
RESOURCES_OVERLOADED
-
STAGE_ALREADY_OPEN
-
REPLY_FAILED_MISSING_MESSAGE_HISTORY_PERM
-
THREAD_WITH_THIS_MESSAGE_ALREADY_EXISTS
-
THREAD_LOCKED
-
MAX_ACTIVE_THREADS
-
MAX_ANNOUNCEMENT_THREADS
-
REFERENCED_MESSSAGE_NOT_FOUND
-
FORWARD_CANNOT_HAVE_CONTENT
-
CANNOT_FORWARD_UNREADABLE_MESSAGE
-
INVALID_LOTTIE_JSON
-
LOTTIE_CANNOT_CONTAIN_RASTERIZED_IMAGE
-
MAX_STICKER_FPS
-
MAX_STICKER_FRAMES
-
MAX_LOTTIE_ANIMATION_DIMENSION
-
STICKER_FPS_TOO_SMALL_OR_TOO_LARGE
-
MAX_STICKER_ANIMATION_DURATION
-
CANNOT_UPDATE_FINISHED_EVENT
-
CANNOT_CREATE_STAGE_CHANNEL_FOR_EVENT
-
MESSAGE_BLOCKED_BY_AUTOMOD
-
TITLE_BLOCKED_BY_AUTOMOD
-
WEBHOOK_FORUM_POST_WITHOUT_THREAD
-
WEBHOOK_POST_WITH_THREAD_NAME_AND_ID
-
INVALID_WEBHOOK_THREAD_CHANNEL
-
INVALID_WEBHOOK_SERVICE_CHANNEL
-
MESSAGE_BLOCKED_BY_HARMFUL_LINK_FILTER
-
ENABLE_ONBOARDING_MISSING_REQUIREMENTS
-
UPDATE_ONBOARDING_MISSING_REQUIREMENTS
-
FAILED_TO_BAN_USERS
-
POLL_VOTING_BLOCKED
-
POLL_EXPIRED
-
POLL_INVALID_CHANNEL_TYPE
-
CANNOT_UPDATE_POLL_MESSAGE
-
POLL_WITH_UNUSABLE_EMOJI
-
CANNOT_EXPIRE_MISSING_POLL
-
SERVER_ERROR
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode() -
getMeaning
-
test
Tests whether the given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()equal to this.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)andRestAction.onErrorFlatMap(Predicate, Function)!- Parameters:
throwable- The throwable to test- Returns:
- True, if the error response is equal to this
-
test
Provides a tests whether a given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()being one of the provided responses.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)andRestAction.onErrorFlatMap(Predicate, Function)!- Parameters:
responses- The responses to test for- Returns:
Predicatewhich returns true, if the error response is equal to this
-
test
Provides a tests whether a given throwable is anErrorResponseExceptionwithErrorResponseException.getErrorResponse()being one of the provided responses.
This is very useful in combination withRestAction.onErrorMap(Predicate, Function)andRestAction.onErrorFlatMap(Predicate, Function)!- Parameters:
responses- The responses to test for- Returns:
Predicatewhich returns true, if the error response is equal to this
-
fromCode
-
fromJSON
-