Skip to content

Commit

Permalink
refactor: modify error handling in preHandle()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mxqueen-yr01 committed Jul 31, 2024
1 parent c110880 commit 003012f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons

} catch (IOException ignored) {
log.error("Unable to read soffit" + soffit);
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return false;
}
catch (NullPointerException e) {
log.error("A user info attribute is missing in the token.");
response.setStatus(HttpStatus.BAD_REQUEST.value());
return false;
}
return true;
Expand Down

0 comments on commit 003012f

Please sign in to comment.