-
Notifications
You must be signed in to change notification settings - Fork 1
Error – Creation
Bartosz Łaniewski edited this page May 10, 2018
·
2 revisions
import {Exception} from "inra-server-error";
class CustomError extends Error implement Exception {
errorCode = 1234;
httpStatus = 500;
userMessage = "Message for users";
callback(error) {
// …
}
}
export default CustomError;
Note: when not using Flow, you cannot implement
Exception
– you can just omit it without any inconveniences.
This Wiki and indvidual modules READMEs contains a lot of information – please take your time and read these instructions carefully.