Package dev.relism.flash.exceptions
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.relism.flash.exceptions.HttpException
- All Implemented Interfaces:
Serializable
Runtime exception carrying an HTTP status code. Extensions map this to a
structured JSON error response via the global exception handler installed by
flash-ext-jackson.
throw HttpException.notFound("Blog");
throw new HttpException(422, "Validation failed: title is required");
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpExceptionbadRequest(String message) static HttpExceptionstatic HttpExceptionstatic HttpExceptionstatic HttpExceptionintstatus()static HttpExceptionstatic HttpExceptionunprocessable(String message) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
-
-
Method Details
-
status
public int status() -
badRequest
-
unauthorized
-
forbidden
-
notFound
-
conflict
-
unprocessable
-
internal
-