Skip to content

Commit 60da979

Browse files
committed
Deal with InternalErrors that skipRetrying
1 parent 2926461 commit 60da979

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { SpanKind } from "@opentelemetry/api";
22
import { VERSION } from "../../version.js";
33
import { ApiError, RateLimitError } from "../apiClient/errors.js";
44
import { ConsoleInterceptor } from "../consoleInterceptor.js";
5-
import { parseError, sanitizeError, TaskPayloadParsedError } from "../errors.js";
5+
import { InternalError, parseError, sanitizeError, TaskPayloadParsedError } from "../errors.js";
66
import { runMetadata, TriggerConfig, waitUntil } from "../index.js";
77
import { recordSpanException, TracingSDK } from "../otel/index.js";
88
import {
@@ -538,9 +538,9 @@ export class TaskExecutor {
538538
error instanceof Error &&
539539
(error.name === "AbortTaskRunError" ||
540540
error.name === "TaskPayloadParsedError" ||
541-
error.name === "ConcurrentWaitError")
541+
("skipRetrying" in error && error.skipRetrying === true))
542542
) {
543-
return { status: "skipped" };
543+
return { status: "skipped", error: error instanceof InternalError ? error : undefined };
544544
}
545545

546546
if (execution.run.maxAttempts) {

0 commit comments

Comments
 (0)