@rayondigital/nest-dapr 0.9.41 → 0.9.42
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.
|
@@ -110,7 +110,7 @@ let DaprPubSubClient = DaprPubSubClient_1 = class DaprPubSubClient {
|
|
|
110
110
|
try {
|
|
111
111
|
const contentType = (_a = messages[0].contentType) !== null && _a !== void 0 ? _a : 'application/json';
|
|
112
112
|
const response = yield this.daprClient.pubsub.publishBulk(name, topic, messages.map((m) => m.payload), producerId ? { metadata: { partitionKey: producerId }, contentType } : undefined);
|
|
113
|
-
if (response.failedMessages) {
|
|
113
|
+
if (response !== undefined && response.failedMessages && response.failedMessages.length > 0) {
|
|
114
114
|
const error = (_c = (_b = response.failedMessages[0]) === null || _b === void 0 ? void 0 : _b.error) !== null && _c !== void 0 ? _c : new Error('Unable to publish message');
|
|
115
115
|
const failedMessages = response.failedMessages.map((m, i) => {
|
|
116
116
|
var _a;
|
package/package.json
CHANGED