- Errors are handled with exceptions.
- throw keyword to break normal exectuion of javascript.
- Node.js has Error class from Error core module.
- Do,
throw Error("My new error message.");
or extend class and throw likeClass MyCustomError extends Error(){}; throw new MyCustomError();
- uncaughtException there is predefined code block on https://nodejs.dev/en/learn/error-handling-in-nodejs/, implement it to avoid this error.
- Error handling with Promises.
- Error handling with Async/Wait.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)