Package dev.reuss.tmdb.core.exception
Enum Class TmdbError
- All Implemented Interfaces:
Serializable,Comparable<TmdbError>,Constable
Known TMDB API status codes and their default HTTP status and message.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the TMDB status code.fromCode(int code) Finds a known TMDB error by status code.intReturns the default HTTP status for the TMDB status code.message()Returns TMDB's default status message.static TmdbErrorReturns the enum constant of this class with the specified name.static TmdbError[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
-
INVALID_SERVICE
-
AUTHENTICATION_FAILED_PERMISSION
-
INVALID_FORMAT
-
INVALID_PARAMETERS
-
INVALID_ID
-
INVALID_API_KEY
-
DUPLICATE_ENTRY
-
SERVICE_OFFLINE
-
SUSPENDED_API_KEY
-
INTERNAL_ERROR
-
ITEM_UPDATED
-
ITEM_DELETED
-
AUTHENTICATION_FAILED
-
FAILED
-
DEVICE_DENIED
-
SESSION_DENIED
-
VALIDATION_FAILED
-
INVALID_ACCEPT_HEADER
-
INVALID_DATE_RANGE
-
ENTRY_NOT_FOUND
-
INVALID_PAGE
-
INVALID_DATE
-
BACKEND_TIMEOUT
-
RATE_LIMIT_EXCEEDED
-
USERNAME_PASSWORD_REQUIRED
-
TOO_MANY_APPEND_TO_RESPONSE_OBJECTS
-
INVALID_TIMEZONE
-
CONFIRMATION_REQUIRED
-
INVALID_USERNAME_OR_PASSWORD
-
ACCOUNT_DISABLED
-
EMAIL_NOT_VERIFIED
-
INVALID_REQUEST_TOKEN
-
RESOURCE_NOT_FOUND
-
INVALID_TOKEN
-
WRITE_PERMISSION_REQUIRED
-
SESSION_NOT_FOUND
-
NO_PERMISSION_TO_EDIT_RESOURCE
-
RESOURCE_PRIVATE
-
NOTHING_TO_UPDATE
-
REQUEST_TOKEN_NOT_APPROVED
-
METHOD_NOT_SUPPORTED
-
BACKEND_CONNECTION_FAILED
-
ID_INVALID
-
USER_SUSPENDED
-
API_MAINTENANCE
-
INVALID_INPUT
-
-
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
-
code
public int code()Returns the TMDB status code.- Returns:
- TMDB status code
-
httpStatus
public int httpStatus()Returns the default HTTP status for the TMDB status code.- Returns:
- HTTP status code
-
message
Returns TMDB's default status message.- Returns:
- status message
-
fromCode
Finds a known TMDB error by status code.- Parameters:
code- TMDB status code- Returns:
- matching error, if known
-