# | Layer | Proposed Changes |
---|
1 | Cps service Layer | - Create a new CpsAdminNotFoundException class, child of CpsAdminException class
- Add CpsAdminNotFoundException as parent for all "NotFound" exceptions:
- AnchorNotFoundException
- DataNodeNotFoundException
- DataspaceNotFoundException
- ModuleNamesNotFoundException
- SchemaSetNotFoundException
|
2 | Controller Layer | - NetworkCmProxyRestExceptionHandler
- create a new @ExceptionHandler for the new CpsAdminNotFoundException
- return with 404 error code
|
3 | Test | - In Cps service Layer we have tests for this exceptions (CpsAdminPersistenceServiceSpec)
- Add new test to the REST handler tests (NetworkCmProxyRestExceptionHandlerSpec)
|