Internal Server Error when creating the same data node twice 33/119333/9
authorniamhcore <niamh.core@est.tech>
Mon, 15 Mar 2021 15:54:12 +0000 (15:54 +0000)
committerNiamh Core <niamh.core@est.tech>
Wed, 24 Mar 2021 09:19:24 +0000 (09:19 +0000)
commit63be201ed60ca0d0b16ebe5a1a9d3a8e3f7b8482
tree91b34d99cf07d0d599801ea4d60ecfdbe46760ff
parent840eecbf7210d0433d94da895a3a11b97d3a4e6f
Internal Server Error when creating the same data node twice

This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException.

Issue-ID: CPS-290
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
19 files changed:
cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java
cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceSpec.groovy
cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java
cps-service/src/main/java/org/onap/cps/spi/CpsAdminPersistenceService.java
cps-service/src/main/java/org/onap/cps/spi/exceptions/AlreadyDefinedException.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java [deleted file]
cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy
cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy