|
@@ -34,7 +34,7 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
|
|
|
@ExceptionHandler(UnauthorizedException.class)
|
|
|
public ResponseEntity<Object> handleUnauthorizedException(UnauthorizedException e) {
|
|
|
//log.error(e.getMessage(), e);
|
|
|
- return handleApiException(DefaultExceptionEnum.AUTHORIZATION_ERROR.exception(e.getMessage()));
|
|
|
+ return handleApiException(DefaultExceptionEnum.AUTHORIZATION_ERROR.exception(e));
|
|
|
}
|
|
|
|
|
|
@ExceptionHandler(ReentrantException.class)
|
|
@@ -55,6 +55,12 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
|
|
|
return handleApiException(DefaultExceptionEnum.RESOURCE_NOT_FOUND.exception(e));
|
|
|
}
|
|
|
|
|
|
+ @ExceptionHandler(ForbiddenException.class)
|
|
|
+ public ResponseEntity<Object> handleForbiddenException(ForbiddenException e) {
|
|
|
+ //log.error(e.getMessage(), e);
|
|
|
+ return handleApiException(DefaultExceptionEnum.ACCESS_FORBIDDEN.exception(e));
|
|
|
+ }
|
|
|
+
|
|
|
@ExceptionHandler(Exception.class)
|
|
|
public ResponseEntity<Object> handleOtherException(Exception e) {
|
|
|
log.error(e.getMessage(), e);
|