@hastehaul/common 2.0.52 → 2.0.54

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.
@@ -109,8 +109,16 @@ class NatsConsumer {
109
109
  }
110
110
  }
111
111
  catch (error) {
112
- console.error("Consumer Error: ", error);
113
- throw new Error("Failed to consume messages");
112
+ switch (error.code) {
113
+ case nats_1.ErrorCode.NoResponders:
114
+ console.error("Consumer Error: no one is listening");
115
+ break;
116
+ case nats_1.ErrorCode.Timeout:
117
+ console.error("Consumer Error: someone is listening but didn't respond");
118
+ break;
119
+ default:
120
+ console.error("Consumer Error: request failed", error);
121
+ }
114
122
  }
115
123
  });
116
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.52",
3
+ "version": "2.0.54",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "ioredis": "^5.3.2",
32
32
  "jsonwebtoken": "^9.0.1",
33
33
  "moment": "^2.29.4",
34
- "nats": "^2.15.1",
34
+ "nats": "^2.17.0",
35
35
  "socket.io": "^4.7.1"
36
36
  }
37
37
  }