Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the logging level of the "normal" errors. #43

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ private boolean hasNoPlatform(HttpServletRequest request) {
private void unsuccessfulRedirectForAuthorization(HttpServletRequest request, HttpServletResponse response,
Exception failed) throws IOException, ServletException {

if (logger.isErrorEnabled()) {
logger.error("Authorization Request failed: " + failed.toString(), failed);
}
if (failed instanceof InvalidInitiationRequestException) {
logger.info("Invalid initiation request: "+ failed);
response.sendError(HttpStatus.BAD_REQUEST.value(), failed.getMessage());
} else if (failed instanceof InvalidClientRegistrationIdException) {
logger.info("Invalid registration ID: "+ failed);
response.sendError(HttpStatus.NOT_FOUND.value(), failed.getMessage());
} else {
logger.error("Authorization Request failed: " + failed.toString(), failed);
response.sendError(HttpStatus.INTERNAL_SERVER_ERROR.value(), HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase());
}
}
Expand Down