-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Łukasz Witkowski edited this page Apr 26, 2021
·
18 revisions
Here's a list of Exceptions for which this extension provides mappers, along with comparison between quarkus-resteasy-problem
and raw quarkus-resteasy-jackson
.
Thrown by Hibernate Validator (@Valid
)
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 400 Bad Request |
HTTP/1.1 400 Bad Request |
Thrown by Quarkus.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 400 Bad Request |
HTTP/1.1 500 Internal Server Error |
Thrown by RESTeasy.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 404 Not Found |
HTTP/1.1 404 Not Found |
Thrown by Quarkus.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 301 Moved Permanently |
HTTP/1.1 301 Moved Permanently |
Thrown by Quarkus/JaxRS.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 409 Conflict |
HTTP/1.1 409 Conflict |
io.quarkus.security.AuthenticationFailedException
/ io.quarkus.security.AuthenticationCompletionExceptionMapper
/ io.quarkus.security.UnauthorizedException
Thrown by Quarkus if JWT token is missing or invalid.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 401 Unauthorized |
HTTP/1.1 401 Unauthorized |
Thrown by Quarkus when @RolesAllowed
not satisfied.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 403 Forbidden |
HTTP/1.1 403 Forbidden |
Example:
throw HttpProblem.builder()
.withType(URI.create("/business-problem"))
.withStatus(Status.CONFLICT)
.withTitle("Business Conflict")
.withDetail("Some business conflict has happened")
.withInstance(URI.create("/problem/special-case"))
.withHeader("X-RFC7807-Message", message)
.with("custom_property", 123)
.build();
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 409 Conflict |
not supported, http 500 |
Example:
throw Problem.builder()
.withType(URI.create("/business-problem"))
.withStatus(Status.CONFLICT)
.withTitle("Business Conflict")
.withDetail("Some business conflict has happened")
.withInstance(URI.create("/problem/special-case"))
.with("custom_property", 123)
.build();
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 409 Conflict |
not supported, http 500 |
Finally top-level exception mapper for all other exceptions throw by user or Quarkus.
quarkus-resteasy-problem | quarkus-resteasy-jackson |
---|---|
HTTP/1.1 500 Internal Server Error |
HTTP/1.1 500 Internal Server Error |