Discussion Forum Middleware Error Codes
Introduction
This document describes how to construct Error codes for all operations
Background
Jira Issues
SB-21578: Discussion Forum>> Exception logs - Collaboration & InteractionReleased
Examples Of Error code
PFT_CCRT10 >> PBK_CCRT10 >> DMW_CCRT10 >> NBB_CCRT10
TraceId: 1234
Error happened at NodeBB end.
NBB_CCRT10 << NBB_CCRT10 << NBB_CCRT10 << NBB_CCRT10
===> Servies:
Discussion Middleware service -> DMW
NodeBB Sercie -> NBB
===> Operations:
Category create - CCRT
Topic create - TCRT
Group create - GCRT
Usr create - UCRT
===> ERROR CODES:
01 - Category creation failed because of reason 1?
02 - Category create failed because of reason 2?
03 - Category update failed because of reason 1?
04 - Category update failed because of reason 2?
...
DMW_CCRT01
NBB_GCRT{error_code}
Problem Statement:
How to assign specific error code to api?
Solution:
API | Unique Operation Name | Operation Name | Error Number | Error Description | Error Code | API errors- Revised | User Interface error |
---|---|---|---|---|---|---|---|
FORUM API's |
|
| |||||
/forum/v2/read | FRED | DMW_FRED | 01 | DMW_FRED01 | The nodebb plug-in or the API is not available. Contact your system administrator to enable it. | Could not read Forum. Try again later. | |
/forum/v2/read | FRED | DMW_FRED | 02 |
| DMW_FRED02 | Mandatory fields are missing in the request. Enter the required values and resend the request. | Could not read Forum. Try again later. |
/forum/v2/read | FRED | DMW_FRED | 03 |
| DMW_FRED03 | Forum read failed due to internal server error or database issues. Try again later. | Could not read Forum. Try again later. |
/forum/v2/create | FCRT | DMW_FCRT | 04 |
| DMW_FCRT04 | Forum creation failed as the nodebb plug-in or the API is not available. Contact your system administrator to enable it. | Could not create Forum. Contact your system administrator. |
/forum/v2/create | DMW_FCRT | 05 |
| DMW_FCRT05 | Forum creation failed, mandatory fields are missing in the request. Enter the required values and resend the request. | Could not create forum, re-enter the values and try again. | |
/forum/v2/create | DMW_FCRT | 06 |
| DMW_FCRT06 | Forum creation failed due to internal server error or database issues. Try again later. | Could not create forum, try again later. | |
/forum/v2/remove | FREM | DMW_FREM | 07 |
| DMW_FREM07 | Removing forum failed, the nodebb plug-in or the API is not available. Contact your system administrator to enable it. | Could not remove forum. Contact your system administrator |
/forum/v2/remove | DMW_FREM | 08 |
| DMW_FREM08 | Removing forum failed as mandatory fields are missing in the request. Enter the required values and resend the request. | Could not remove forum. Try again later. | |
/forum/v2/remove | DMW_FREM | 09 |
| DMW_FREM09 | Removing Forum failed due to internal server error or database issues. Try again later. | Could not remove forum. Try again later. | |
Tags API |
|
| |||||
/tags | TRED | DMW_TRED | 01 |
| DMW_TRED01 | Reading tags failed due to internal server error or database issues. Try again later. | Could not read tags. Try again later |
/tags/list | TLST | DMW_TLST | 02 |
| DMW_TLST02 | Reading tags failed due to internal server error or database issues. Try again later. | Could not read tags. Try again later |
/tags/:tag | TRDIS | DMW_TRDIS | 03 |
| DMW_TRDIS03 | Reading tags failed due to internal server error or database issues. Try again later. | Could not read tags. Try again later. |
/tags/list | TLSL | DMW_TLST | 04 |
| DMW_TLST04 | Tag list failed as, the nodebb plug-in or the API is not available. Contact your system administrator to enable it. | Could not read tags. Try again later. |
/tags/list | TSLS | DMW_TLST | 05 |
| DMW_TLST05 | Tag list failed as mandatory fields are missing in the request. Enter the required values and resend the request. | Could not read tags. Try again later. |
USER DETAILS API's |
|
| |||||
/user/:userslug | URED | DMW_URED | 01 |
| DMW_URED01 | Failed to read user details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read user details. Try again later. |
/user/:userslug | DMW_URED | 02 |
| DMW_URED02 | Failed to read user details, user does not exists. Contact your system administrator. | User does not exists. Contact your system administrator. | |
/user/:userslug/upvoted | UUVR | DMW_URED | 03 |
| DMW_UUVR03 | Failed to read user up-vote post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read up vote post. Try again later. |
/user/:userslug/upvoted | DMW_URED | 04 |
| DMW_UUVR04 | Failed to read user up-vote post details, user does not exist. Contact your system administrator. | Could not read up vote post as user does not exists. Contact your system administrator. | |
/user/:userslug/downvoted | UDVR | DMW_URED | 05 |
| DMW_UDVR05 | Failed to read user down vote post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read down vote post. Try again later. |
/user/:userslug/downvoted | DMW_URED | 06 |
| DMW_UDVR06 | Failed to read user down vote post details as user does not exist. Contact your system administrator. | Could not read down vote post as user does not exists. Contact your system administrator. | |
/user/:userslug/bookmarks | UBMR | DMW_URED | 07 |
| DMW_UBMR07 | Failed to read saved post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read saved post. Try again later. |
/user/:userslug/bookmarks | DMW_URED | 08 |
| DMW_UBMR08 | Failed to read user saved post details as user does not exist. Contact your system administrator. | Could not read saved post as user does not exists. Contact your system administrator. | |
/user/v1/create | UCRT | DMW_UCRT | 09 |
| DMW_UCRT09 | Failed to create user, there may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. |
/user/v1/create | DMW_UCRT | 10 |
| DMW_UCRT10 | Failed to create user, the nodebb plug-in or the API is not available. Contact your system administrator to enable it. | Could not create user. Try again later. | |
CATEGORY API's | |||||||
/category/:category_id/:slug | CDTL | DMW_CRED | 01 |
| DMW_CDTL01 | Failed to read category details, there may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read category details. Try again later. |
/category/:category_id/:slug | DMW_CRED | 02 |
| DMW_CDTL02 | Failed to read category details, as category ID does not exists. Contact your system administrator. | Could not read category details. Try again later. | |
/category/:cid | CRED | DMW_CRED | 03 |
| DMW_CRED03 | Failed to read category cid details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not read category details. Try again later. |
/category/:cid | DMW_CRED | 04 |
| DMW_CRED04 | Failed to read category as cid details does not exists. Contact your system administrator to enable it. | Could not read category details. Try again later. | |
/categories | CLST | DMW_CRED | 05 |
| DMW_CLST05 | Failed to access category list. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not access category list. Try again later. |
/v2/categories | CCRT | DMW_CCRT | 06 |
| DMW_CCRT06 | Failed to create category. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create category. Try again later. |
/v2/categories | DMW_CCRT | 07 |
| DMW_CCRT07 | Failed to create category as nodebb-plugin write API is not enabled. Contact your system administrator. | Could not create category. Try again later. | |
/v2/categories | DMW_CCRT | 08 |
| DMW_CCRT08 | Failed to create category, unauthorised user. Contact your system administrator. | Could not create category. Try again later. | |
/v2/categories | DMW_CCRT | 09 |
| DMW_CCRT09 | Failed to create category, mandatory fields are missing in the request. Enter the required values and resend the request. | Could not create category. Try again later. | |
/v2/categories/:cid(PUT) | CUDT | DMW_CUDT | 10 |
| DMW_CUDT10 | Failed to update category, there may be a network error or there are too many concurrent calls to the server. Try again later. | Could not update category. Try again later. |
/v2/categories/:cid(PUT) | DMW_CUDT | 11 |
| DMW_CUDT11 | Failed to update category as nodebb-plugin write API is not enabled or cid does not exists. Contact your system administrator to enable it. | Could not update category. Try again later. | |
/v2/categories/:cid(PUT) | DMW_CUDT | 12 |
| DMW_CUDT12 | Failed to update category, unauthorised user. Contact your system administrator. | Could not update category, unautorised user. Contact your system administrator. | |
/v2/categories/:cid(PUT) | DMW_CUDT | 13 |
| DMW_CUDT13 | Failed to update category, mandatory fields are missing in the request. Enter the required values and resend the request. | Could not update category. Try again later. | |
/v2/categories/:cid(DELETE) | CDEL | DMW_CDEL | 14 |
| DMW_CDEL14 | Failed to delete category. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not delete category. Try again later. |
/v2/categories/:cid(DELETE) | DMW_CDEL | 15 |
| DMW_CDEL15 | Failed to delete category as nodebb-plugin write API is not enabled or cid does not exists. Contact your system administrator to enable it. | Could not delete category. Try again later. | |
/v2/categories/:cid(DELETE) | 16 |
| DMW_CDEL16 | Failed to delete category, unauthorised user. Contact your system administrator. | Could not delete category. Try again later. | ||
/category/list | CLST | DMW_CLST | 17 |
| DMW_CLST17 | Failed to read category list API. The plugin might not be enabled for your instance. Contact your system administrator to enable it. | Could not read category list. Try again later. |
/category/list | CLST | DMW_CLST | 18 |
| DMW_CLST18 | Failed to read category as cid details does not exists. Contact your system administrator to enable it. | Could not read category. Try again later. |
TOPICS API's | |||||||
/unread | TUNR | DMW_TRED | 01 | Access unread topics failed | DMW_TUNR01 | Failed to read user down vote post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. |
/recent | TRCT | DMW_TRED | 02 | Access recent topics failed. | DMW_TRCT02 | Failed to read user down vote post details as user does not exist. Contact your system administrator. | Could not create user. Try again later. |
/topic/:topic_id/:slug | TDTL | DMW_TRED | 03 | Access topic details failed | DMW_TDTL03 | Failed to read saved post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. |
/topic/:topic_id/:slug | DMW_TRED | 04 | Access topic details failed because of topic id is not exists | DMW_TDTL04 | Failed to read user down vote post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. | |
/v2/topics | TCRT | DMW_TCRT | 05 | Create topic failed | DMW_TCRT05 | Failed to read user down vote post details as user does not exist. Contact your system administrator. | Could not create user. Try again later. |
/v2/topics | DMW_TCRT | 06 | Create topic failed because of nodebb-plugin-write-api plugin not enabled. | DMW_TCRT06 | Failed to read saved post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. | |
/v2/topics | DMW_TCRT | 07 | Create topic failed because of you are not authorized. | DMW_TCRT07 |
| Could not create user. Try again later. | |
/v2/topics | DMW_TCRT | 08 | Create topic failed because of request payload is incorrect. | DMW_TCRT08 |
| Could not create user. Try again later. | |
/v2/topics/:tid(POST) | RCRT | DMW_RCRT | 09 | Add reply failed | DMW_RCRT09 | Failed to read user down vote post details. There may be a network error or there are too many concurrent calls to the server. Try again later. | Could not create user. Try again later. |
/v2/topics/:tid(POST) |