diff --git a/packages/core/src/v3/workers/taskExecutor.ts b/packages/core/src/v3/workers/taskExecutor.ts index 6fbc207dcc..475e9feb96 100644 --- a/packages/core/src/v3/workers/taskExecutor.ts +++ b/packages/core/src/v3/workers/taskExecutor.ts @@ -383,7 +383,7 @@ export class TaskExecutor { reject( new InternalError({ code: TaskRunErrorCodes.MAX_DURATION_EXCEEDED, - message: `Task execution exceeded maximum duration of ${maxDuration}ms`, + message: `Run exceeded maximum compute time (maxDuration) of ${maxDuration} seconds`, }) ); }); diff --git a/packages/core/test/taskExecutor.test.ts b/packages/core/test/taskExecutor.test.ts index 355471297c..9451f1bae2 100644 --- a/packages/core/test/taskExecutor.test.ts +++ b/packages/core/test/taskExecutor.test.ts @@ -1417,7 +1417,7 @@ describe("TaskExecutor", () => { test("should handle max duration abort signal and call hooks in correct order", async () => { const executionOrder: string[] = []; - const maxDurationMs = 1000; + const maxDurationSeconds = 1000; // Create an abort controller that we'll trigger manually const controller = new AbortController(); @@ -1439,7 +1439,7 @@ describe("TaskExecutor", () => { fn: async ({ error }) => { executionOrder.push("failure"); expect((error as Error).message).toBe( - `Task execution exceeded maximum duration of ${maxDurationMs}ms` + `Run exceeded maximum compute time (maxDuration) of ${maxDurationSeconds} seconds` ); }, }); @@ -1494,7 +1494,7 @@ describe("TaskExecutor", () => { error: { type: "INTERNAL_ERROR", code: TaskRunErrorCodes.MAX_DURATION_EXCEEDED, - message: "Task execution exceeded maximum duration of 1000ms", + message: "Run exceeded maximum compute time (maxDuration) of 1000 seconds", stackTrace: expect.any(String), }, skippedRetrying: false,