dexpress-finalhandler
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -52,3 +52,3 @@ /*! | ||
// get error callback | ||
var onerror = opts.onerror | ||
var { onerror, onservererror } = opts | ||
@@ -70,2 +70,3 @@ // get error transformer, transforms error before handling as error | ||
var rawErr = err | ||
err = errortransform(err) | ||
@@ -93,2 +94,6 @@ | ||
if ((!status || status >= 500) && onservererror) { | ||
onservererror(rawErr) | ||
} | ||
// get error message | ||
@@ -151,3 +156,3 @@ body = getErrorBody(err, status) | ||
for (var key in err) { | ||
if([ 'message', 'reason', 'status', 'statusCode', 'expose' ].includes(key)) { | ||
if([ 'message', 'reason', 'status', 'statusCode', 'expose', 'name' ].includes(key)) { | ||
continue; | ||
@@ -154,0 +159,0 @@ } |
{ | ||
"name": "dexpress-finalhandler", | ||
"description": "Node.js final http responder", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Niels Abildgaard <niels@deranged.dk>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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
18364
253