We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 803d295 commit 84a37d0Copy full SHA for 84a37d0
1 file changed
packages/store/src/queue-worker.js
@@ -451,6 +451,21 @@ function queueWorkerRun(
451
didHandleJob: true,
452
};
453
})
454
+ .catch((e) => {
455
+ if (_compasSentryExport) {
456
+ _compasSentryExport.captureException(e);
457
+ }
458
+
459
+ logger.error({
460
+ type: "job_unhandled_error",
461
+ error: AppError.format(e),
462
+ });
463
464
+ return {
465
+ // It tried to but failed. Slow down intentionally, before reattempting the next pick up.
466
+ didHandleJob: false,
467
+ };
468
+ })
469
.then(({ didHandleJob }) => {
470
if (!didHandleJob) {
471
worker.currentPromise = setTimeout(options.pollInterval);
0 commit comments