summaryrefslogtreecommitdiffstats
path: root/ms/error-catalog/README.md
diff options
context:
space:
mode:
authorBrinda Santh <bs2796@att.com>2020-03-06 13:04:37 -0500
committerKAPIL SINGAL <ks220y@att.com>2020-03-11 17:55:28 +0000
commit91b3a6477c4d5136bea02d3c1284a51b2f2ec1b1 (patch)
treefc8fe811f14dced88bc7e7296b60d1ce2990452d /ms/error-catalog/README.md
parent55ec3c71441abda7c6058f4c2cc569c129f635ba (diff)
Error Catalog Management Core Library.
Issue-ID: CCSDK-2076 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I9e8e67bdee77fb359a791f4ef4c2963aa78ab93a Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com>
Diffstat (limited to 'ms/error-catalog/README.md')
-rwxr-xr-xms/error-catalog/README.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/ms/error-catalog/README.md b/ms/error-catalog/README.md
new file mode 100755
index 000000000..d6ae56d02
--- /dev/null
+++ b/ms/error-catalog/README.md
@@ -0,0 +1,36 @@
+## How to use library
+
+##### 1. Set Error Catalog service type (Database or properties file service) in application.properties file
+
+```
+##### Error Managements #####
+## For database service type ##
+# error.catalog.type=DB
+## For database service type ##
+# error.catalog.type=properties
+error.catalog.applicationId=cds
+error.catalog.type=properties
+```
+
+##### 2. Generate exception
+
+- HTTP Error Exception
+```
+errorCatalogException: ErrorCatalogException = httpProcessorException(ErrorCatalogCodes.ERROR_TYPE,
+"Error message here...")
+```
+
+- GRPC Error Exception
+```
+errorCatalogException: ErrorCatalogException = grpcProcessorException(ErrorCatalogCodes.ERROR_TYPE,
+"Error message here...")
+```
+
+##### 3. Update an existing exception
+```
+e = errorCatalogException.code(500)
+e = errorCatalogException.action("message")
+...
+```
+
+##### 4. Add a HTTP REST Exception handler \ No newline at end of file