+ @ExceptionHandler({HttpClientRequestException.class})
+ public static ResponseEntity<Object> handleClientRequestExceptions(
+ final HttpClientRequestException httpClientRequestException) {
+ return wrapDmiErrorResponse(HttpStatus.BAD_GATEWAY, httpClientRequestException);
+ }
+
+ @ExceptionHandler({DmiRequestException.class, DataValidationException.class, HttpMessageNotReadableException.class,
+ InvalidTopicException.class})
+ public static ResponseEntity<Object> handleDmiRequestExceptions(final Exception exception) {
+ return buildErrorResponse(HttpStatus.BAD_REQUEST, exception);
+ }
+
+ @ExceptionHandler({DataNodeNotFoundException.class})
+ public static ResponseEntity<Object> handleNotFoundExceptions(final CpsException exception) {
+ return buildErrorResponse(HttpStatus.NOT_FOUND, exception);
+ }
+