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
|
|
@ -10,9 +10,15 @@ export class IdentifiableError extends Error {
|
|||
public message: string;
|
||||
public id: string;
|
||||
|
||||
constructor(id: string, message?: string) {
|
||||
/**
|
||||
* Indicates that this is a temporary error that may be cleared by retrying
|
||||
*/
|
||||
public readonly isRetryable: boolean;
|
||||
|
||||
constructor(id: string, message?: string, isRetryable = false) {
|
||||
super(message);
|
||||
this.message = message ?? '';
|
||||
this.id = id;
|
||||
this.isRetryable = isRetryable;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue