@coozzy/request-id
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -31,3 +31,3 @@ const cls = require('cls-hooked'); | ||
ns.run(async function () { | ||
const requestId = msg.properties.headers.requestId || uuidv4(); | ||
const requestId = msg && msg.properties && msg.properties.headers ? msg.properties.headers.requestId || uuidv4() : uuidv4(); | ||
ns.set(KEY, requestId); | ||
@@ -34,0 +34,0 @@ |
{ | ||
"name": "@coozzy/request-id", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "This small package helps managing requestIds in sync/async callback chains", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
1879