1.0.5 • Published 11 months ago

error-berior-check v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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.
1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago