public enum RestServiceErrorCode extends java.lang.Enum<RestServiceErrorCode>
RestServiceException
. Each of these error codes are expected to go
into certain "groups" that map to HTTP error codes.
The groups are:
ResponseStatus.Gone
ResponseStatus.NotFound
ResponseStatus.BadRequest
ResponseStatus.InternalServerError
ResponseStatus.Forbidden
ResponseStatus.ProxyAuthenticationRequired
ResponseStatus.Unauthorized
About logging:
Generally, error codes not belonging to the group InternalServerError
are logged at DEBUG level.Enum Constant and Description |
---|
AccessDenied
An authenticated client is not authorized to access a resource.
|
BadRequest
Generic BadRequest error code when a client provides a request that is not fit for processing.
|
Deleted
Resource has been deleted or has expired.
|
IdConverterServiceError
Indicates that
IdConverter encountered some exception during ID conversion |
InsufficientCapacity
There is insufficient capacity to service the request.
|
InternalServerError
Generic InternalServerError that is a result of problems on the server side that is not caused by the client and
there is nothing that a client can do about it.
|
InvalidAccount
The account is not valid.
|
InvalidArgs
Client has sent arguments (whether in the URI or in the headers) that are not in the format that is expected or if
the number of values for an argument expected by the server does not match what the client sent.
|
InvalidContainer
The container is not valid.
|
InvalidRequestState
Client has sent request content without sending request metadata first or has sent content when no content
was expected (for e.g.
|
MalformedRequest
Client has sent a request that cannot be decoded using the REST protocol (usually HTTP).
|
MissingArgs
Client has sent a request that is missing some arguments (whether in the URI or in the headers) necessary to
service the request.
|
NotAllowed
Action not allowed
|
NotFound
Resource was not found.
|
PreconditionFailed
The conditions given in the request header fields evaluated to false.
|
RangeNotSatisfiable
Range request is not satisfiable (because the provided range is invalid or outside of the bounds of an object.)
|
RequestChannelClosed
Indicates that a
RestRequest has been closed and an operation could not be performed on it. |
RequestResponseQueuingFailure
Indicates that the submitted request or response could not be queued in the AsyncRequestResponseHandler.
|
RequestTooLarge
The request is larger than what the server is willing or is configured to accept.
|
ResourceDirty
Resource scan has deducted that the resource is not safe for serving
|
ResourceScanInProgress
Resource scan still in progress and result not yet available
|
ServiceUnavailable
Indicates that the service is unavailable because one or more of the components is not started, is shutdown, has
crashed or is temporarily unable to respond.
|
TooManyRequests
Application rate limit exceeded/Application quota limit exceeded.
|
Unauthorized
Client has sent a request that cannot be processed due to authorization failure.
|
UnsupportedHttpMethod
Client is requesting a HTTP method that is not supported.
|
UnsupportedRestMethod
Indicates a
RestMethod is not supported (May also indicate a bug where behaviour for a new
RestMethod has not been defined in the implementation). |
Modifier and Type | Method and Description |
---|---|
static RestServiceErrorCode |
getRestServiceErrorCode(RouterErrorCode routerErrorCode)
Gets the RestServiceErrorCode that corresponds to the
routerErrorCode . |
static RestServiceErrorCode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RestServiceErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RestServiceErrorCode Deleted
public static final RestServiceErrorCode NotFound
public static final RestServiceErrorCode ResourceScanInProgress
public static final RestServiceErrorCode ResourceDirty
public static final RestServiceErrorCode AccessDenied
public static final RestServiceErrorCode Unauthorized
public static final RestServiceErrorCode BadRequest
public static final RestServiceErrorCode InvalidArgs
public static final RestServiceErrorCode InvalidRequestState
RestMethod.GET
).public static final RestServiceErrorCode InvalidAccount
public static final RestServiceErrorCode InvalidContainer
public static final RestServiceErrorCode MalformedRequest
public static final RestServiceErrorCode MissingArgs
public static final RestServiceErrorCode UnsupportedHttpMethod
public static final RestServiceErrorCode RangeNotSatisfiable
public static final RestServiceErrorCode InternalServerError
public static final RestServiceErrorCode IdConverterServiceError
IdConverter
encountered some exception during ID conversionpublic static final RestServiceErrorCode RequestChannelClosed
RestRequest
has been closed and an operation could not be performed on it.public static final RestServiceErrorCode RequestResponseQueuingFailure
public static final RestServiceErrorCode RequestTooLarge
public static final RestServiceErrorCode ServiceUnavailable
public static final RestServiceErrorCode TooManyRequests
public static final RestServiceErrorCode UnsupportedRestMethod
RestMethod
is not supported (May also indicate a bug where behaviour for a new
RestMethod
has not been defined in the implementation).public static final RestServiceErrorCode InsufficientCapacity
public static final RestServiceErrorCode PreconditionFailed
public static final RestServiceErrorCode NotAllowed
public static RestServiceErrorCode[] values()
for (RestServiceErrorCode c : RestServiceErrorCode.values()) System.out.println(c);
public static RestServiceErrorCode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static RestServiceErrorCode getRestServiceErrorCode(RouterErrorCode routerErrorCode)
routerErrorCode
.routerErrorCode
- input RouterErrorCode
.routerErrorCode
belongs to.