Exception handling on REST interface
authorRuslan Kashapov <ruslan.kashapov.bf@gmail.com>
Wed, 28 Oct 2020 14:53:58 +0000 (16:53 +0200)
committerRuslan Kashapov <ruslan.kashapov.bf@gmail.com>
Fri, 6 Nov 2020 08:57:42 +0000 (10:57 +0200)
commitf338b922dbd40df98aa94312ab0a13e9581f3b26
tree004ab87db91255acbf8aae75fca3d8e7a168d6c8
parent47598117ee0b411cfc6fad323598f5644b51c9c9
Exception handling on REST interface

- customisable error message
- unified approach for exception handling
- unified approach for error message delivery

Change-Id: Iecb46a119008fdae284fc730f459e729168e92a7
Issue-ID: CPS-41
JIRA: https://jira.onap.org/browse/CPS-41
Signed-off-by: Ruslan Kashapov <ruslan.kashapov.bf@gmail.com>
cps/cps-rest/pom.xml
cps/cps-rest/src/main/java/org/onap/cps/rest/controller/CpsRestController.java
cps/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java [new file with mode: 0644]
cps/cps-rest/src/main/java/org/onap/cps/rest/exceptions/ErrorMessage.java [new file with mode: 0644]
cps/cps-service/src/main/java/org/onap/cps/api/CpService.java
cps/cps-service/src/main/java/org/onap/cps/api/impl/CpServiceImpl.java
cps/cps-service/src/main/java/org/onap/cps/exceptions/CpsException.java [new file with mode: 0644]
cps/cps-service/src/main/java/org/onap/cps/exceptions/CpsNotFoundException.java [new file with mode: 0644]
cps/cps-service/src/main/java/org/onap/cps/exceptions/CpsValidationException.java [new file with mode: 0644]
cps/cps-service/src/test/groovy/org/onap/cps/api/impl/CpServiceImplSpec.groovy