@ExceptionHandler({Exception.class}) public ResponseEntity<Object> exceptionHandler(HttpServletRequest req, Exception exception) { logger.error("Exception handler: {}", exception); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_500)); }
@ExceptionHandler({Exception.class}) public ResponseEntity<Object> exceptionHandler(HttpServletRequest req, Exception exception) { logger.error("Exception handler: {}", exception); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_500)); }
@ExceptionHandler({Exception.class}) public ResponseEntity<Object> exceptionHandler(HttpServletRequest req, Exception exception) { logger.error("Exception handler: {}", exception); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_500)); }
@ExceptionHandler({Exception.class}) public ResponseEntity<Object> exceptionHandler(HttpServletRequest req, Exception exception) { logger.error("Exception handler: {}", exception); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_500)); }
@ExceptionHandler({UnsupportedOperationException.class}) public ResponseEntity<Object> unsupportedOperation(HttpServletRequest req, UnsupportedOperationException exception) { logger.error("Unsupported operation: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_403)); }
@ExceptionHandler({HttpMessageNotReadableException.class}) public ResponseEntity<Object> messageNotReadableExceptionHandler(HttpServletRequest req, HttpMessageNotReadableException exception) { logger.error("Message not readable: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_400)); }
@ExceptionHandler({UnsupportedOperationException.class}) public ResponseEntity<Object> unsupportedOperation(HttpServletRequest req, UnsupportedOperationException exception) { logger.error("Unsupported operation: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_403)); }
@ExceptionHandler({HttpMessageNotReadableException.class}) public ResponseEntity<Object> messageNotReadableExceptionHandler(HttpServletRequest req, HttpMessageNotReadableException exception) { logger.error("Message not readable: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_400)); }
@ExceptionHandler({HttpMessageNotReadableException.class}) public ResponseEntity<Object> messageNotReadableExceptionHandler(HttpServletRequest req, HttpMessageNotReadableException exception) { logger.error("Message not readable: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_400)); }
@ExceptionHandler({UnsupportedOperationException.class}) public ResponseEntity<Object> unsupportedOperation(HttpServletRequest req, UnsupportedOperationException exception) { logger.error("Unsupported operation: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_403)); }
@ExceptionHandler({HttpMessageNotReadableException.class}) public ResponseEntity<Object> messageNotReadableExceptionHandler(HttpServletRequest req, HttpMessageNotReadableException exception) { logger.error("Message not readable: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_400)); }
@ExceptionHandler({UnsupportedOperationException.class}) public ResponseEntity<Object> unsupportedOperation(HttpServletRequest req, UnsupportedOperationException exception) { logger.error("Unsupported operation: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_403)); }
@ExceptionHandler({MismatchIdException.class}) public ResponseEntity<Object> mismatchIdException(HttpServletRequest req, MismatchIdException exception) { logger.error("Mismatch id: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_472, exception.getParameterId())); }
@ExceptionHandler({MismatchIdException.class}) public ResponseEntity<Object> mismatchIdException(HttpServletRequest req, MismatchIdException exception) { logger.error("Mismatch id: {}", exception.toString()); return errorResponse(req.getRequestURI(), new StatusCode(CodeEnum.CODE_472, exception.getParameterId())); }
@ExceptionHandler({MissingRequestParameterException.class}) public ResponseEntity<Object> missingParameter(HttpServletRequest req, MissingRequestParameterException missingException) { logger.error("Missing parameter: {}", missingException.getParameterName()); StatusCode statusCode = new StatusCode(CodeEnum.CODE_471, missingException.getParameterName(), missingException.getParameterType()); return errorResponse(req.getRequestURI(), statusCode); }
@ExceptionHandler({MissingRequestParameterException.class}) public ResponseEntity<Object> missingParameter(HttpServletRequest req, MissingRequestParameterException missingException) { logger.error("Missing parameter: {}", missingException.getParameterName()); StatusCode statusCode = new StatusCode(CodeEnum.CODE_471, missingException.getParameterName(), missingException.getParameterType()); return errorResponse(req.getRequestURI(), statusCode); }
@ExceptionHandler({MissingRequestParameterException.class}) public ResponseEntity<Object> missingParameter(HttpServletRequest req, MissingRequestParameterException missingException) { logger.error("Missing parameter: {}", missingException.getParameterName()); StatusCode statusCode = new StatusCode(CodeEnum.CODE_471, missingException.getParameterName(), missingException.getParameterType()); return errorResponse(req.getRequestURI(), statusCode); }
@ExceptionHandler({MissingRequestParameterException.class}) public ResponseEntity<Object> missingParameter(HttpServletRequest req, MissingRequestParameterException missingException) { logger.error("Missing parameter: {}", missingException.getParameterName()); StatusCode statusCode = new StatusCode(CodeEnum.CODE_471, missingException.getParameterName(), missingException.getParameterType()); return errorResponse(req.getRequestURI(), statusCode); }