diff options
author | seanbeirne <sean.beirne@est.tech> | 2024-11-04 16:36:10 +0000 |
---|---|---|
committer | seanbeirne <sean.beirne@est.tech> | 2024-11-18 10:43:36 +0000 |
commit | 7e6fee9321e4f13cc4a0d81f83fc3693309cb5d7 (patch) | |
tree | f1a87adf60644eb4eb991274a6f6d44df3457e12 /cps-ncmp-rest/src | |
parent | 37962e3faca4f2306546c4f70d480b0c323d2c68 (diff) |
Update error response for ncmp endpoints
Issue-ID: CPS-2386
Change-Id: Ib4f37858f5f107e350a13e4bf7ed93493864ce60
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src')
-rw-r--r-- | cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java index 6910003c54..7255743c67 100644 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java @@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j; import org.onap.cps.ncmp.api.data.exceptions.InvalidDatastoreException; import org.onap.cps.ncmp.api.data.exceptions.InvalidOperationException; import org.onap.cps.ncmp.api.data.exceptions.OperationNotSupportedException; +import org.onap.cps.ncmp.api.exceptions.CmHandleNotFoundException; import org.onap.cps.ncmp.api.exceptions.DmiClientRequestException; import org.onap.cps.ncmp.api.exceptions.DmiRequestException; import org.onap.cps.ncmp.api.exceptions.InvalidTopicException; @@ -90,8 +91,8 @@ public class NetworkCmProxyRestExceptionHandler { return buildErrorResponse(HttpStatus.CONFLICT, exception); } - @ExceptionHandler({DataNodeNotFoundException.class}) - public static ResponseEntity<Object> handleNotFoundExceptions(final Exception exception) { + @ExceptionHandler({CmHandleNotFoundException.class, DataNodeNotFoundException.class}) + public static ResponseEntity<Object> cmHandleNotFoundExceptions(final Exception exception) { return buildErrorResponse(HttpStatus.NOT_FOUND, exception); } |