public enum RestError extends Enum<RestError> implements org.mule.runtime.extension.api.error.ErrorTypeDefinition<RestError>
| Enum Constant and Description |
|---|
BAD_REQUEST |
CLIENT_ERROR |
CONNECTIVITY |
INTERNAL_SERVER_ERROR |
NOT_ACCEPTABLE |
NOT_FOUND |
SERVER_ERROR |
SERVICE_UNAVAILABLE |
TIMEOUT |
TOO_MANY_REQUESTS |
UNAUTHORIZED |
UNSUPPORTED_MEDIA_TYPE |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage() |
static Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> |
getErrorTypeDefinitionByStatusCode(int statusCode)
Returns the
RestError corresponding to a given status code. |
Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> |
getParent() |
static RestError |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RestError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RestError CONNECTIVITY
public static final RestError CLIENT_ERROR
public static final RestError TIMEOUT
public static final RestError UNAUTHORIZED
public static final RestError NOT_FOUND
public static final RestError TOO_MANY_REQUESTS
public static final RestError BAD_REQUEST
public static final RestError UNSUPPORTED_MEDIA_TYPE
public static final RestError NOT_ACCEPTABLE
public static final RestError SERVER_ERROR
public static final RestError INTERNAL_SERVER_ERROR
public static final RestError SERVICE_UNAVAILABLE
public static RestError[] values()
for (RestError c : RestError.values()) System.out.println(c);
public static RestError valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> getParent()
getParent in interface org.mule.runtime.extension.api.error.ErrorTypeDefinition<RestError>public static Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> getErrorTypeDefinitionByStatusCode(int statusCode)
RestError corresponding to a given status code. A match is found if there's an RestError with the
same name as the status code's corresponding HttpConstants.HttpStatus.statusCode - the HTTP status code to search forOptional with the ErrorTypeDefinition that matches the statusCodepublic String getErrorMessage()
Copyright © 2022. All rights reserved.