summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-02-03 15:03:42 -0500
committerHazelnoot <acomputerdog@gmail.com>2025-02-03 15:03:42 -0500
commit3391c2414b0fc89d897fc3ecf66ca1dffaf6dfe9 (patch)
treeb8da205ca3c959a77a0b9faffce982f20cd54bf8 /packages/backend/src/queue
parentcopy changes to ci.yml and cypress-devcontainer.yml (diff)
downloadsharkey-3391c2414b0fc89d897fc3ecf66ca1dffaf6dfe9.tar.gz
sharkey-3391c2414b0fc89d897fc3ecf66ca1dffaf6dfe9.tar.bz2
sharkey-3391c2414b0fc89d897fc3ecf66ca1dffaf6dfe9.zip
add IdentifiableError.isRetryable to ensure that Identifiable Errors can still terminate a batch process
Diffstat (limited to 'packages/backend/src/queue')
-rw-r--r--packages/backend/src/queue/processors/InboxProcessorService.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index 7727a3e985..87d4bf52fa 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -248,6 +248,14 @@ export class InboxProcessorService implements OnApplicationShutdown {
return `skip: permanent error ${e.statusCode}`;
}
+ if (e instanceof IdentifiableError && !e.isRetryable) {
+ if (e.message) {
+ return `skip: permanent error ${e.id}: ${e.message}`;
+ } else {
+ return `skip: permanent error ${e.id}`;
+ }
+ }
+
throw e;
}
return 'ok';