@remit/mailbox-service 0.0.69 → 0.0.70
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/package.json +1 -1
- package/src/outbox-queue.ts +15 -1
package/package.json
CHANGED
package/src/outbox-queue.ts
CHANGED
|
@@ -231,7 +231,21 @@ export class OutboxQueueService {
|
|
|
231
231
|
OutboxMessageStatus.queued,
|
|
232
232
|
);
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
// `queued` is a dead end for a row the queue never accepted: `send` takes
|
|
235
|
+
// draft, failed and blocked, `deleteDraft` those three plus unfiled, so a
|
|
236
|
+
// row parked at `queued` by a failed enqueue is neither sendable nor
|
|
237
|
+
// discardable (#845.8). Put it back where it came from and let the enqueue
|
|
238
|
+
// failure surface — the row stays reachable, the caller still hears no.
|
|
239
|
+
await this.enqueueSend(existing.accountId, outboxMessageId).catch(
|
|
240
|
+
async (error: unknown) => {
|
|
241
|
+
await this.outboxMessageService.updateStatus(
|
|
242
|
+
accountConfigId,
|
|
243
|
+
outboxMessageId,
|
|
244
|
+
existing.status,
|
|
245
|
+
);
|
|
246
|
+
throw error;
|
|
247
|
+
},
|
|
248
|
+
);
|
|
235
249
|
|
|
236
250
|
this.log.info(
|
|
237
251
|
{ outboxMessageId, accountId: existing.accountId },
|