REST level exception handling cleanup
- removed direct handling of persistence exceptions
- error message model is now described via OpenAPI config
Issue-ID: CPS-79
Change-Id: Ib460b020ae9c650e1f81b46ab01dab641c953170
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
diff --git a/cps-rest/docs/api/swagger/openapi.yml b/cps-rest/docs/api/swagger/openapi.yml
index 0c7c83c..56a012f 100755
--- a/cps-rest/docs/api/swagger/openapi.yml
+++ b/cps-rest/docs/api/swagger/openapi.yml
@@ -364,18 +364,28 @@
description: Not Found
content: {}
components:
- schemas:
- Anchor:
- type: object
- title: Anchor
- required:
- - anchorName
- - namespace
- - revision
- properties:
- anchorName:
- type: string
- namespace:
- type: string
- revision:
- type: string
\ No newline at end of file
+ schemas:
+ ErrorMessage:
+ type: object
+ title: Error
+ properties:
+ status:
+ type: string
+ message:
+ type: string
+ details:
+ type: string
+ Anchor:
+ type: object
+ title: Anchor
+ required:
+ - anchorName
+ - namespace
+ - revision
+ properties:
+ anchorName:
+ type: string
+ namespace:
+ type: string
+ revision:
+ type: string