Skip to content

Commit

Permalink
Merge pull request #43 from oxctl/reduce-logging-level
Browse files Browse the repository at this point in the history
Reduce the logging level of the "normal" errors.
  • Loading branch information
buckett authored Nov 23, 2023
2 parents 4f9d542 + 4ce14f7 commit d49a710
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit d49a710

Please sign in to comment.