unnbound-events 2.0.5 → 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.
@@ -57,7 +57,6 @@ class HttpQueueServer {
57
57
  return this.app.use(...(0, middleware_1.buildMiddlewareArguments)(...args));
58
58
  };
59
59
  start() {
60
- this.options.logger?.info({}, 'Server started.');
61
60
  const adapters = [
62
61
  new http_adapter_1.HttpAdapter({
63
62
  app: this.app,
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.5",
4
+ "version": "2.0.7",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "Unnbound Team",