From d8af6808847b8fbd044077e7c4688ca869b70169 Mon Sep 17 00:00:00 2001 From: ToineSiebelink Date: Wed, 20 Nov 2024 08:21:23 +0000 Subject: Revert "Update error response for ncmp endpoints" This reverts commit 7e6fee9321e4f13cc4a0d81f83fc3693309cb5d7. Reason for revert: This patch is causing blocking issues at ESH see CPS-2509 Issue-ID: CPS-2509 Change-Id: Ie1bd26ccca4abcac09faf35e2b97491dab32b14d Signed-off-by: ToineSiebelink --- cps-ncmp-rest/docs/openapi/components.yaml | 2 +- cps-ncmp-rest/docs/openapi/ncmp.yml | 2 +- .../cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'cps-ncmp-rest') diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml index 637a1386f4..e564c6b0cf 100644 --- a/cps-ncmp-rest/docs/openapi/components.yaml +++ b/cps-ncmp-rest/docs/openapi/components.yaml @@ -516,7 +516,7 @@ components: outputAlternateIdOptionInQuery: name: outputAlternateId in: query - description: Boolean parameter to determine if returned value(s) will be cm handle ids or alternate ids for a given query + description: Boolean parameter to determine if returned value(s) will be cm handle Ids or alternate Ids for a given query required: false schema: type: boolean diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml index 15b8b37231..4624bc1060 100755 --- a/cps-ncmp-rest/docs/openapi/ncmp.yml +++ b/cps-ncmp-rest/docs/openapi/ncmp.yml @@ -417,7 +417,7 @@ getCmHandleStateById: searchCmHandleIds: post: - description: Execute cm handle query search and return a list of cm handle references. Any number of conditions can be applied. To be included in the result a cm handle must fulfill ALL the conditions. An empty collection will be returned in the case that the cm handle does not match a condition. For more on cm handle query search please refer to cm handle query search Read the Docs.
By supplying a CPS Path it is possible to query on any data related to the cm handle. For more on CPS Path please refer to CPS Path Read the Docs. The cm handle ancestor is automatically returned for this query. + description: Execute cm handle query search and return a list of cm handle references. Any number of conditions can be applied. To be included in the result a cm-handle must fulfill ALL the conditions. An empty collection will be returned in the case that the cm handle does not match a condition. For more on cm handle query search please refer to cm handle query search Read the Docs.
By supplying a CPS Path it is possible to query on any data related to the cm handle. For more on CPS Path please refer to CPS Path Read the Docs. The cm handle ancestor is automatically returned for this query. tags: - network-cm-proxy summary: Execute cm handle query upon a given set of query parameters 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 7255743c67..6910003c54 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,7 +26,6 @@ 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; @@ -91,8 +90,8 @@ public class NetworkCmProxyRestExceptionHandler { return buildErrorResponse(HttpStatus.CONFLICT, exception); } - @ExceptionHandler({CmHandleNotFoundException.class, DataNodeNotFoundException.class}) - public static ResponseEntity cmHandleNotFoundExceptions(final Exception exception) { + @ExceptionHandler({DataNodeNotFoundException.class}) + public static ResponseEntity handleNotFoundExceptions(final Exception exception) { return buildErrorResponse(HttpStatus.NOT_FOUND, exception); } -- cgit 1.2.3-korg