aboutsummaryrefslogtreecommitdiffstats
path: root/ms/error-catalog/README.md
diff options
context:
space:
mode:
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