pbs-middleware-server/src/main/java/com/pbs/middleware/server/common/exception/MiddlewareExceptionHandler.java
/**
     * All unhandled exception are returned as [com.pbs.middleware.server.common.exception.AccessDeniedException]
     */
All unhandled exception are returned as [com.pbs.middleware.server.common.exception.AccessDeniedException]
All unhandled exception are returned as [ com . pbs . middleware . server . common . exception . AccessDeniedException ]
@ExceptionHandler({AccessDeniedException.class})
    public ResponseEntity<Object> handleAccessDeniedException2(AccessDeniedException ex) {
        return new ResponseEntity<>(ErrorResponse.of(
                Error.builder()
                        .code(ex.getErrorCode())
                        .message(ex.getMessage())
                        .build()), ex.getHttpStatus());
    }
@ ExceptionHandler ( { AccessDeniedException . class } ) public ResponseEntity < Object > handleAccessDeniedException2 ( AccessDeniedException ex ) { return new ResponseEntity < > ( ErrorResponse . of ( Error . builder ( ) . code ( ex . getErrorCode ( ) ) . message ( ex . getMessage ( ) ) . build ( ) ) , ex . getHttpStatus ( ) ) ; }
All unhandled exception are returned as [com.pbs.middleware.server.common.exception.AccessDeniedException]
All unhandled exception are returned as [ com . pbs . middleware . server . common . exception . AccessDeniedException ]