Call super constructor in subclasses of WebApplicationException
Frameworks like Datadog dd-trace-java java agent inspect the known WebApplicationException and mark the exception as an HTTP 500, because that is the default for the non argument constructor. https://github.com/keycloak/keycloak/issues/29451 Signed-off-by: Filipe Roque <froque@premium-minds.com>
This commit is contained in:
parent
1aab371912
commit
e83f3af080
3 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,7 @@ public class CorsErrorResponseException extends WebApplicationException {
|
|||
private final Response.Status status;
|
||||
|
||||
public CorsErrorResponseException(Cors cors, String error, String errorDescription, Response.Status status) {
|
||||
super(error, status);
|
||||
this.cors = cors;
|
||||
this.error = error;
|
||||
this.errorDescription = errorDescription;
|
||||
|
|
|
@ -36,6 +36,7 @@ public class ErrorPageException extends WebApplicationException {
|
|||
|
||||
|
||||
public ErrorPageException(KeycloakSession session, Response.Status status, String errorMessage, Object... parameters) {
|
||||
super(errorMessage, status);
|
||||
this.session = session;
|
||||
this.status = status;
|
||||
this.errorMessage = errorMessage;
|
||||
|
|
|
@ -36,6 +36,7 @@ public class ErrorResponseException extends WebApplicationException {
|
|||
private final Response.Status status;
|
||||
|
||||
public ErrorResponseException(String error, String errorDescription, Response.Status status) {
|
||||
super(error, status);
|
||||
this.response = null;
|
||||
this.error = error;
|
||||
this.errorDescription = errorDescription;
|
||||
|
|
Loading…
Reference in a new issue