Skip to content

Commit 119cedc

Browse files
committed
Added ConcurrentWaitError (not retryable)
1 parent 22262ed commit 119cedc

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/core/src/v3/errors.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ export class TaskPayloadParsedError extends Error {
3131
}
3232
}
3333

34+
export class ConcurrentWaitError extends Error {
35+
constructor(message: string) {
36+
super(message);
37+
this.name = "ConcurrentWaitError";
38+
}
39+
}
40+
3441
export function parseError(error: unknown): TaskRunError {
3542
if (error instanceof Error) {
3643
return {

packages/core/src/v3/workers/taskExecutor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ export class TaskExecutor {
536536

537537
if (
538538
error instanceof Error &&
539-
(error.name === "AbortTaskRunError" || error.name === "TaskPayloadParsedError")
539+
(error.name === "AbortTaskRunError" ||
540+
error.name === "TaskPayloadParsedError" ||
541+
error.name === "ConcurrentWaitError")
540542
) {
541543
return { status: "skipped" };
542544
}

0 commit comments

Comments
 (0)