Skip to content

Commit

Permalink
changed exception handler without context path
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishch22 committed Oct 26, 2023
1 parent ddc02f9 commit 1b9023d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ResponseEntity<Object> handleTypeMismatch(TypeMismatchException ex, Ht
@ExceptionHandler(value = { Exception.class, RuntimeException.class, MissingRequestHeaderException.class })
public ResponseEntity handleExceptions(Exception ex, WebRequest request) {
log.error("Unhandled exception encountered in handler advice", ex);
String pathInfo = ((ServletWebRequest)request).getRequest().getServletPath();
String pathInfo = ((ServletWebRequest)request).getRequest().getRequestURI();

boolean isInternalAPI = pathInfo != null && (pathInfo.startsWith("/authorization") ||
pathInfo.startsWith("/client-mgmt/"));
Expand Down

0 comments on commit 1b9023d

Please sign in to comment.