Skip to content

Commit d0859ab

Browse files
committed
Sending Exact error in JwtAuthenticationEntryPoint
1 parent 1a10a15 commit d0859ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

polling-app-server/src/main/java/com/example/polls/security/JwtAuthenticationEntryPoint.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public void commence(HttpServletRequest httpServletRequest,
2323
HttpServletResponse httpServletResponse,
2424
AuthenticationException e) throws IOException, ServletException {
2525
logger.error("Responding with unauthorized error. Message - {}", e.getMessage());
26-
httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED,
27-
"Sorry, You're not authorized to access this resource.");
26+
httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, e.getMessage());
2827
}
2928
}

0 commit comments

Comments
 (0)