add IdentifiableError.isRetryable to ensure that Identifiable Errors can still terminate a batch process
This commit is contained in:
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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue