error-berior-check
v1.0.5
Published
its error beutifier for backend side and give a well structure define errors
Downloads
3
Maintainers
Readme
ERROR-BERIOR-CHECK
-- Use this package this way and handle your error more readable Form
Installation
-- Use the package manager npm to install error-berrior-check package.
npm i error-berior-check
EXAMPLE
FEATURES
* Logs the error message, the HTTP status code, and the stack trace
of the error to the console.
* Sends an email to the administrator if the error is critical.
Give you this type of error logs with statusCode
{
"message": "Error getting data",
"statusCode": 500
}
Create an instance of the error handler
const myErrorHandler = new ErrorHandler("Error occurred", 500);
// Handle an error
myErrorHandler.handleError(err);
## I hope this gives you some ideas for using the error-handler
package in your API handlers.