Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

This document describes how to construct Error codes for all operations?

Background

Jira Issues

https://project-sunbird.atlassian.net/browse/SB-21578

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

FORUM API's






/forum/v2/read

FRED

DMW_FRED

01

Forum read failed because plugin not enabled.


DMW_FRED01

/forum/v2/create

FCRT

DMW_FCRT

02

Forum create failed because plugin not enabled.

DMW_FCRT02

Tags API






/tags

TRED

DMW_TRED

03

Tags read failed

DMW_TRED03

USER DETAILS API's






/user/:userslug

URED

DMW_URED

04

User details read failed

DMW_URED04

/user/:userslug/upvoted

UUVR

DMW_URED

05

User up vote post details read failed

DMW_URED05

/user/:userslug/downvoted

UDVR

DMW_URED

06

User down vote post details read failed

DMW_URED06

/user/:userslug/bookmarks

UBMR

DMW_URED

07

User saved post details read failed

DMW_URED07

/user/v1/create

UCRT

DMW_UCRT

08

Create user failed

DMW_UCRT08

CATEGORY API's






/category/:category_id/:slug

CDTL

DMW_CRED

09

Category details read failed.

DMW_CRED09

/category/:cid

CRED

DMW_CRED




/categories

CLST

DMW_CRED

10

Access list of categories failed.

DMW_CRED10

/v2/categories

CCRT

DMW_CCRT

11

Create category failed

DMW_CCRT11

/v2/categories/:cid(PUT)

CUDT

DMW_CUDT

12

Update category failed

DMW_CUDT12

/v2/categories/:cid(DELETE)

CDEL

DMW_CDEL

13

Delete category failed

DMW_CDEL13

TOPICS API's






/unread

TUNR

DMW_TRED

14

Access unread topics failed

DMW_TRED14

/recent

TRCT

DMW_TRED

15

Access recent topics failed.

DMW_TRED15

/topic/:topic_id/:slug

TDTL

DMW_TRED

16

Access topic details failedĀ 

DMW_TRED16

/v2/topics

TCRT

DMW_TCRT

17

Create topicĀ  failed

DMW_TCRT17

/v2/topics/:tid(POST)

RCRT

DMW_RCRT

18

Add reply failed

DMW_RCRT18

/v2/topics/:tid(PUT)

TUDT

DMW_TUDT

19

Update topics/reply failed

DMW_TUDT19

/v2/topics/:tid(DELETE)

TDEL

DMW_TDEL

20

Delete topic/reply failed

DMW_TDEL20

POST API's






/post/pid/:pid

PRED

DWM_PRED

21

Access post details failed

DWM_PRED21

/v2/posts/:pid(POST)

PCRT

DMW_PCRT

22

Create post failed

DMW_PCRT22

/v2/posts/:pid(DELETE)

PDEL

DWM_PDEL

23

Delete post failed

DWM_PDEL23

/v2/posts/:pid/vote(POST)

PVOT

DMW_PCRT

24

Adding vote to a post failed

DMW_PCRT24

/v2/posts/:pid/vote(DELETE)

PVDL

DMW_PCRT

25

Deleting vote failed

DMW_PCRT25

/v2/posts/:pid/bookmark(POST)

PSVE

DMW_PCRT

26

Bookmark post failed

DMW_PCRT26

/v2/posts/:pid/bookmark(DELETE)

PUSVE

DMW_PCRT

27

Delete bookmark failed

DMW_PCRT27













  • No labels