Files
triggerdotdev--trigger.dev/docs
Matt Aitken 62e006617e
⚒️ Publish Worker (v4) / build (supervisor) (push) Has been cancelled
fix(cli): fail attempt on uncaught exception instead of hanging to maxDuration (TRI-9117) (#3529)
When a Node EventEmitter (e.g. node-redis) emits an "error" event with
no
listener attached, Node escalates it to process.on("uncaughtException")
in
the task worker. The worker reported the error via the
UNCAUGHT_EXCEPTION
IPC event but did not exit, and the supervisor-side handler in
taskRunProcess only logged the message at debug level — leaving the
run()
promise orphaned until maxDuration fired and producing empty attempts
(durationMs=0, costInCents=0).

The supervisor now rejects the in-flight attempt with an
UncaughtExceptionError and gracefully terminates the worker (preserving
the OTEL flush window) on UNCAUGHT_EXCEPTION. The attempt fails fast
with
TASK_EXECUTION_FAILED, surfacing the original error name, message, and
stack trace, and falls under the normal retry policy. This mirrors the
existing indexing-side behavior in indexWorkerManifest. Apply the same
handling to unhandled promise rejections, which Node already routes
through uncaughtException by default.
2026-05-06 19:35:43 +01:00
..
2024-09-11 17:14:39 +01:00
2025-08-18 12:34:55 +01:00
2024-08-07 11:13:45 +01:00
2026-04-20 17:06:01 +01:00
2026-03-04 09:55:54 +00:00

Development

Install and initial setup

pnpm install

Running the app

pnpm run dev --filter docs

View the app locally

It runs locally here: http://localhost:3050