Created
August 19, 2019 21:02
-
-
Save jastisriradheshyam/54cbdd2f698281470148560b6a091333 to your computer and use it in GitHub Desktop.
Error handling Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // response for error handling | |
| let response = { | |
| success: Boolean, | |
| errorType: Number, // 1 - Programmer or config, 2 - Operational | |
| responseCode: String, | |
| message: String | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Defining
errorTypeis difficult2is for error caused by the inputs to the system which are not valid and has to be corrected according to current state of the system.1is the programmer or system error which is not due to the correct inputs