bunqueue v2.8.13
Fixes 3 bugs. moveToFailed() sends the stack.
To install bunqueue v2.8.13
Section titled “To install bunqueue v2.8.13”bun add bunqueue@2.8.13npm install bunqueue@2.8.13To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”The 2.8.11 fix wired the failure stack through the natural-throw path only: a
processor that throws gets its stack sent on FAIL (persisted server-side) and set
on the local failed event’s job.stacktrace. A processor that catches the error and
reports it explicitly with await job.moveToFailed(err) went through a different code
path that never touched the stack, so, as @arthurvanl’s repro showed, job.stacktrace
was null on the failed event and queue.getJob(id).stacktrace stayed null, while
an equivalent natural throw populated both.
moveToFailed()sends the stack. The explicit handler now computes the stack lines and includes them onFAIL(stack, TCP) /manager.fail(..., wireStack)(embedded), so the server persists them exactly like the throw path, visible viagetJob()and in DLQ entries.- Local
failedevent populated. The manual-move handler now setsjob.stacktrace(capped atjob.stackTraceLimit) on the emitted job, matching the natural-throw behavior. - The stack-splitting logic is now a single shared
computeStackLines()helper used by both paths, so they can’t drift apart again.
Reproduced in both modes with test/repro-issue74-movetofailed-stacktrace.test.ts
(local event + server-side getJob() persistence, embedded and TCP).
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.12 · Release on GitHub · Commits since v2.8.12 · Full changelog · All posts