@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.
@@ -501,7 +501,7 @@ var noOpStorage = {
501
501
  };
502
502
  function buildBaseContext(req, config = {}) {
503
503
  return {
504
- requestId: req.headers["x-request-id"] || generateRequestId(),
504
+ requestId: req?.headers?.["x-request-id"] || generateRequestId(),
505
505
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
506
506
  env: process.env,
507
507
  config: {