@ladjs/graceful
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -90,4 +90,5 @@ const http = require('node:http'); | ||
process.on('unhandledRejection', (err) => { | ||
// we don't want to log here, we want to throw the error | ||
// so that processes exit or bubble up to middleware error handling | ||
// always log to console the error (e.g. so we can see it on pm2 logs) | ||
console.error(err); | ||
// we want to throw so that processes exit or bubble up to middleware error handling | ||
// we need to support listening to unhandledRejections (backward compatibility) | ||
@@ -101,2 +102,4 @@ // (even though node is deprecating this in future versions) | ||
process.once('uncaughtException', (err) => { | ||
// always log to console the error (e.g. so we can see it on pm2 logs) | ||
console.error(err); | ||
if (this.config.hideMeta) | ||
@@ -103,0 +106,0 @@ this.config.logger.error(err, { [this.config.hideMeta]: true }); |
{ | ||
"name": "@ladjs/graceful", | ||
"description": "Gracefully exit HTTP servers (Express/Koa/Fastify/etc), databases (Mongo/Mongoose), Bree job schedulers, and custom handlers.", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27101
317