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 Details

  • Constructor Details

    • UnprocessableEntityException

      public UnprocessableEntityException(String message)
    • UnprocessableEntityException

      public UnprocessableEntityException(Throwable cause)
    • UnprocessableEntityException

      public UnprocessableEntityException(String message, Throwable cause)
    • UnprocessableEntityException

      public UnprocessableEntityException(Map<String,List<String>> byKey)
    • UnprocessableEntityException

      public UnprocessableEntityException(List<String> general, Map<String,List<String>> byKey)
  • Method Details

    • getGeneral

      public List<String> getGeneral()
    • getByKey

      public Map<String,List<String>> getByKey()
    • keyedSingle

      public static UnprocessableEntityException keyedSingle(String key, String error)
      Keyed Single returns a new UnprocessableEntityException with 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 new UnprocessableEntityException with 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 new UnprocessableEntityException with 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.