Created
August 19, 2019 21:02
-
-
Save jastisriradheshyam/54cbdd2f698281470148560b6a091333 to your computer and use it in GitHub Desktop.
Error handling Javascript
This file contains 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 | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Defining
errorType
is difficult2
is 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.1
is the programmer or system error which is not due to the correct inputs