@0x/api-utils
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -104,2 +104,5 @@ "use strict"; | ||
// the Express default error handler closes the connection and fails the request. | ||
// | ||
// So when you add a custom error handler, you must delegate to the default Express error handler, | ||
// when the headers have already been sent to the client: | ||
if (res.headersSent) { | ||
@@ -118,3 +121,2 @@ return next(err); | ||
req.log.child({ errorBody }).error(err); | ||
next(err); | ||
} | ||
@@ -121,0 +123,0 @@ }; |
@@ -15,3 +15,4 @@ "use strict"; | ||
logger, | ||
genReqId: (req) => uuid_1.v4(), | ||
// Re-use request ID from upstream (i.e. nginx reverse proxy) | ||
genReqId: (req) => { var _a; return (((_a = req.headers) === null || _a === void 0 ? void 0 : _a['x-request-id']) ? req.headers['x-request-id'] : uuid_1.v4()); }, | ||
useLevelLabels: logger.useLevelLabels, | ||
@@ -18,0 +19,0 @@ autoLogging: true, |
{ | ||
"name": "@0x/api-utils", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "lib/src/index.js", | ||
@@ -19,3 +19,2 @@ "types": "lib/src/index.d.ts", | ||
"publish:private": "yarn build && gitpkg publish", | ||
"run:publish": "yarn build && yarn publish --access public", | ||
"test": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*.test.js --timeout 200000 --exit --bail" | ||
@@ -22,0 +21,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
63574
881
5