unnbound-events 2.0.6 → 2.0.7

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/lib/utils.js CHANGED
@@ -45,7 +45,12 @@ const getIncomingRequest = async (request) => {
45
45
  };
46
46
  };
47
47
  const parseBody = async (request) => {
48
- return await request.json();
48
+ try {
49
+ return await request.json();
50
+ }
51
+ catch {
52
+ return undefined;
53
+ }
49
54
  };
50
55
  const getMetadataFromRequest = (request, source) => ({
51
56
  traceId: request.headers[types_1.defaultTraceHeaderKey] ?? (0, unnbound_logger_sdk_1.getTraceId)(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unnbound-events",
3
3
  "description": "Unified events SDK to handle HTTP routes and queued messages with a single routing API.",
4
- "version": "2.0.6",
4
+ "version": "2.0.7",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "Unnbound Team",