Class UnprocessableEntityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.ws.rs.WebApplicationException
jakarta.ws.rs.ClientErrorException
org.veupathdb.lib.container.jaxrs.errors.UnprocessableEntityException
- All Implemented Interfaces:
Serializable
public class UnprocessableEntityException
extends jakarta.ws.rs.ClientErrorException
Extension for the JaxRS exceptions for 422 errors.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUnprocessableEntityException(String message) UnprocessableEntityException(String message, Throwable cause) UnprocessableEntityException(Map<String, List<String>> byKey) -
Method Summary
Modifier and TypeMethodDescriptiongetByKey()static UnprocessableEntityExceptionkeyedSingle(String key, String error) Keyed Single returns a newUnprocessableEntityExceptionwith a single error key mapped to a single error message.static UnprocessableEntityExceptionkeyedSingles(String key1, String error1, String key2, String error2) Keyed singles returns a newUnprocessableEntityExceptionwith two error keys, each mapped to a single error message.static UnprocessableEntityExceptionKeyed singles returns a newUnprocessableEntityExceptionwith three error keys, each mapped to a single error message.Methods inherited from class jakarta.ws.rs.WebApplicationException
getResponseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
UNPROCESSABLE_ENTITY
public static final int UNPROCESSABLE_ENTITY- See Also:
-
-
Constructor Details
-
UnprocessableEntityException
-
UnprocessableEntityException
-
UnprocessableEntityException
-
UnprocessableEntityException
-
UnprocessableEntityException
-
-
Method Details
-
getGeneral
-
getByKey
-
keyedSingle
Keyed Single returns a newUnprocessableEntityExceptionwith a single error key mapped to a single error message.- Parameters:
key- Error Key.error- Error Message- Returns:
- new
UnprocessableEntityException.
-
keyedSingles
public static UnprocessableEntityException keyedSingles(String key1, String error1, String key2, String error2) Keyed singles returns a newUnprocessableEntityExceptionwith two error keys, each mapped to a single error message.- Parameters:
key1- First error key.error1- First error message.key2- Second error key.error2- Second error message.- Returns:
- new
UnprocessableEntityException.
-
keyedSingles
public static UnprocessableEntityException keyedSingles(String key1, String error1, String key2, String error2, String key3, String error3) Keyed singles returns a newUnprocessableEntityExceptionwith three error keys, each mapped to a single error message.- Parameters:
key1- First error key.error1- First error message.key2- Second error key.error2- Second error message.key3- Third error key.error3- Third error message.- Returns:
- new
UnprocessableEntityException.
-