Open
Description
Link to the code that reproduces this issue
https://github.com/samijaber/nextjs-reject-bug-repro/
To Reproduce
- https://github.com/samijaber/nextjs-reject-bug-repro/
npm run dev
- open
/
and see error message - toggle the two different promises to compare stack traces https://github.com/samijaber/nextjs-reject-bug-repro/blob/ea125b442fbb275efcb3341fa70a4f2199395708/src/app/page.tsx#L112-L117
Current vs. Expected behavior
When a Promise reject has an Error reason:
When a Promise reject has a non-Error reason (an arbitrary object):
note how we lose information on where the rejection is coming from.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 20.11.0
npm: 10.2.4
Yarn: 1.22.19
pnpm: 8.10.2
Relevant Packages:
next: 15.2.3 // Latest available version is detected (15.2.3).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.8.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Error Handling
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response