Bad error messages when attempting to run invalid libraries in workflow context
Open
@adriandlam is already working on this.
Since Nov 4, 2025.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 169
Description
We need to do a better job of capturing and emitting errors for non node compatible packages that get used inside the workflow. For example, EventTarget when trying to use the upstash redis client.
improving stacktraces (#151) is also critical to make the experience of debugging these issues better
ReferenceError while running "wrun_01K8VGKHAZ0Z96K2QZ1T1K1WD0" workflow:
evalmachine.<anonymous>:26779
var Subscriber = class extends EventTarget {
^
ReferenceError: EventTarget is not defined
at evalmachine.<anonymous>:26779:18
at Script.runInContext (node:vm:149:12)
at runInContext (node:vm:301:6)
at /Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/0c935_@workflow_core_dist_cdced69a._.js:2226:158
at /Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/0c935_@workflow_core_dist_cdced69a._.js:200:34
at NoopContextManager.with (/Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/4b6e4_@opentelemetry_api_build_esm_9cee443b._.js:122:24)
at ContextAPI.with (/Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/4b6e4_@opentelemetry_api_build_esm_9cee443b._.js:785:54)
at NoopTracer.startActiveSpan (/Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/4b6e4_@opentelemetry_api_build_esm_9cee443b._.js:1962:31)
at ProxyTracer.startActiveSpan (/Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/4b6e4_@opentelemetry_api_build_esm_9cee443b._.js:2009:24
)
at trace (/Users/pranaygp/github/vercel-support/v0-community-dashboard/.next/dev/server/chunks/0c935_@workflow_core_dist_cdced69a._.js:198:19)
POST /.well-known/workflow/v1/flow 200 in 182ms
x-ref thread: https://vercel.slack.com/archives/C09125LC4AX/p1761855473693419
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.