summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java
diff options
context:
space:
mode:
authorJosephKeenan <joseph.keenan@est.tech>2022-01-20 16:30:18 +0000
committerJosephKeenan <joseph.keenan@est.tech>2022-01-26 10:36:17 +0000
commit38dbf3378f54bdab34de342f736e30160d65353d (patch)
treee36b503889fc225adac74af5db122928982da41c /cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java
parent9e7559c59342d5e15b7d18066fe615c986c45847 (diff)
[TECHDEBT] Align CPS NCMP REST API Specification and Implementationmr/823/126723/7
- Updated ncmp.yml to align implementation with specification - Added new Exception classes to differentiate between server NCMP issues and client based NCMP issues - Added 500 error to specification Issue-ID: CPS-823 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Ic646db5cc4dfc8d14106c8374b7c62cc9f9ab6e7
Diffstat (limited to 'cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java
index 509728061..853a8aacc 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiOperations.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021-2022 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.api.impl.client.DmiRestClient;
import org.onap.cps.ncmp.api.impl.config.NcmpConfiguration;
-import org.onap.cps.ncmp.api.impl.exception.NcmpException;
+import org.onap.cps.ncmp.api.impl.exception.DmiRequestException;
import org.springframework.http.HttpHeaders;
@Slf4j
@@ -106,7 +106,7 @@ public class DmiOperations {
return objectMapper.writeValueAsString(dmiRequestBody);
} catch (final JsonProcessingException e) {
log.error("Parsing error occurred while converting Object to JSON.");
- throw new NcmpException("Parsing error occurred while converting given object to JSON.",
+ throw new DmiRequestException("Parsing error occurred while converting given object to JSON.",
e.getMessage());
}
}