|
|
@@ -38,6 +38,9 @@ public class ExceptionHandlerAdvice {
|
|
|
map.put("detailedMessage", ExceptionUtils.getDetailedMessage(e));
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
+ if (e instanceof SecurityException) {
|
|
|
+ return new ResponseEntity<>(map, headers, HttpStatus.FORBIDDEN);
|
|
|
+ }
|
|
|
return new ResponseEntity<>(map, headers, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
}
|
|
|
|