pbs-middleware-server/src/main/java/com/pbs/middleware/server/common/exception/MiddlewareExceptionHandler.java
/**
     * All unhandled exception are returned as [org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR]
     */
All unhandled exception are returned as [org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR]
All unhandled exception are returned as [ org . springframework . http . HttpStatus . INTERNAL_SERVER_ERROR ]
@ExceptionHandler(Exception.class)
    private ResponseEntity<ErrorResponse> handle(Exception ex) {
        logger.error("Server exception:", ex);
        return new ResponseEntity<>(
                ErrorResponse.of(
                        Error.builder()
                                .code(INTERNAL_ERROR.toString())
                                .message(ex.getMessage())
                                .build()),
                INTERNAL_SERVER_ERROR);
    }
@ ExceptionHandler ( Exception . class ) private ResponseEntity < ErrorResponse > handle ( Exception ex ) { logger . error ( "Server exception:" , ex ) ; return new ResponseEntity < > ( ErrorResponse . of ( Error . builder ( ) . code ( INTERNAL_ERROR . toString ( ) ) . message ( ex . getMessage ( ) ) . build ( ) ) , INTERNAL_SERVER_ERROR ) ; }
All unhandled exception are returned as [org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR]
All unhandled exception are returned as [ org . springframework . http . HttpStatus . INTERNAL_SERVER_ERROR ]