Skip to content

Commit

Permalink
Fix missing cause
Browse files Browse the repository at this point in the history
`TURBOPACK=1 TURBOPACK_DEV=1 pnpm test test/integration/edge-runtime-streaming-error/test/index.test.ts` will now produce an error
that does have a `originalCodeFrame` and therefore
goes through the codepath previously omitting cause.

`logErrorWithOriginalStack` will be gone soon anyway.
  • Loading branch information
eps1lon committed Dec 3, 2024
1 parent 3d9ed04 commit aa350bd
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,8 @@ async function startWatcher(opts: SetupOpts) {
frames
)

const error: NextError = new Error(err.message)
error.stack = stack
error.digest = err.digest
errorToLog = error
err.stack = stack
errorToLog = err
} else {
errorToLog = err
}
Expand Down

0 comments on commit aa350bd

Please sign in to comment.