diff --git a/jans-auth-server/server/src/main/java/io/jans/as/server/par/ws/rs/ParRestWebService.java b/jans-auth-server/server/src/main/java/io/jans/as/server/par/ws/rs/ParRestWebService.java index e1134a46c54..5715822ffef 100644 --- a/jans-auth-server/server/src/main/java/io/jans/as/server/par/ws/rs/ParRestWebService.java +++ b/jans-auth-server/server/src/main/java/io/jans/as/server/par/ws/rs/ParRestWebService.java @@ -204,6 +204,7 @@ private ErrorResponse createErrorResponseFromRedirectErrorUri(@NotNull URI locat final ErrorResponse response = new ErrorResponse(); + String error = locationRedirect.getResponseParameter("error"); String errorDescription = locationRedirect.getResponseParameter("error_description"); errorDescription = Optional.ofNullable(errorDescription) .map(description -> Optional.ofNullable(ThreadContext.get(Constants.CORRELATION_ID_HEADER)) @@ -211,7 +212,7 @@ private ErrorResponse createErrorResponseFromRedirectErrorUri(@NotNull URI locat .orElse(description)) .orElse(null); - response.setErrorCode(errorDescription); + response.setErrorCode(error); response.setErrorDescription(errorDescription); return response; }