1
0

add IdentifiableError.isRetryable to ensure that Identifiable Errors can still terminate a batch process

This commit is contained in:
Hazelnoot
2025-02-03 15:03:42 -05:00
parent 4a86ab6857
commit 3391c2414b
3 changed files with 16 additions and 2 deletions
@@ -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';