@sinch/functions-runtime 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1275,7 +1275,7 @@ var noOpStorage = {
1275
1275
  };
1276
1276
  function buildBaseContext(req, config = {}) {
1277
1277
  return {
1278
- requestId: req.headers["x-request-id"] || generateRequestId(),
1278
+ requestId: req?.headers?.["x-request-id"] || generateRequestId(),
1279
1279
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1280
1280
  env: process.env,
1281
1281
  config: {