@hastehaul/common 2.0.53 → 2.0.54
Sign up to get free protection for your applications and to get access to all the features.
@@ -109,8 +109,16 @@ class NatsConsumer {
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
catch (error) {
|
112
|
-
|
113
|
-
|
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
|
}
|