X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-rest%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Frest%2Fexceptions%2FCpsRestExceptionHandler.java;h=5dfd03bf2b6a7371097341c4080b4b0f607f3e59;hb=ad9b701a00c237ae8e462de76b500c8612866da6;hp=0c6edd5b4e676b5af4ae4ecc4d3a48857f26a407;hpb=b66c131f643069a74ae7b18064c0cf7ca9655155;p=cps.git 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 0c6edd5b4..5dfd03bf2 100755 --- 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 @@ -1,7 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2020 Pantheon.tech - * Modifications Copyright (C) 2021-2022 Nordix Foundation + * Modifications Copyright (C) 2021-2023 Nordix Foundation * Modifications Copyright (C) 2022 TechMahindra Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,6 @@ import org.onap.cps.rest.controller.DataRestController; import org.onap.cps.rest.controller.QueryRestController; import org.onap.cps.rest.model.ErrorMessage; import org.onap.cps.spi.exceptions.AlreadyDefinedException; -import org.onap.cps.spi.exceptions.AlreadyDefinedExceptionBatch; import org.onap.cps.spi.exceptions.CpsAdminException; import org.onap.cps.spi.exceptions.CpsException; import org.onap.cps.spi.exceptions.CpsPathException; @@ -78,7 +77,7 @@ public class CpsRestExceptionHandler { ? HttpStatus.NOT_FOUND : HttpStatus.BAD_REQUEST, exception); } - @ExceptionHandler({DataInUseException.class, AlreadyDefinedException.class, AlreadyDefinedExceptionBatch.class}) + @ExceptionHandler({DataInUseException.class, AlreadyDefinedException.class}) public static ResponseEntity handleDataInUseException(final Exception exception) { return buildErrorResponse(HttpStatus.CONFLICT, exception); }