diff options
Diffstat (limited to 'cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java')
-rw-r--r-- | cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java index d1a773c1e..2b096240b 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java @@ -24,13 +24,11 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.onap.cps.rest.controller.AdminRestController; import org.onap.cps.rest.controller.DataRestController; import org.onap.cps.rest.model.ErrorMessage; -import org.onap.cps.spi.exceptions.AnchorAlreadyDefinedException; import org.onap.cps.spi.exceptions.CpsAdminException; import org.onap.cps.spi.exceptions.CpsException; import org.onap.cps.spi.exceptions.DataValidationException; import org.onap.cps.spi.exceptions.ModelValidationException; import org.onap.cps.spi.exceptions.NotFoundInDataspaceException; -import org.onap.cps.spi.exceptions.SchemaSetAlreadyDefinedException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; @@ -54,8 +52,7 @@ public class CpsRestExceptionHandler { return buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, exception); } - @ExceptionHandler({ModelValidationException.class, DataValidationException.class, - SchemaSetAlreadyDefinedException.class, AnchorAlreadyDefinedException.class, CpsAdminException.class}) + @ExceptionHandler({ModelValidationException.class, DataValidationException.class, CpsAdminException.class}) public static ResponseEntity<Object> handleBadRequestExceptions(final CpsException exception) { return buildErrorResponse(HttpStatus.BAD_REQUEST, exception.getMessage(), extractDetails(exception)); } |