Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Edge runtime] console.error does not include error.cause #74218

Open
juliesaia opened this issue Dec 22, 2024 · 0 comments
Open

[Edge runtime] console.error does not include error.cause #74218

juliesaia opened this issue Dec 22, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@juliesaia
Copy link

Link to the code that reproduces this issue

https://github.com/juliesaia/next-error-edge-repro

To Reproduce

  1. next dev
  2. Click "Trigger error"
  3. No cause is logged
  4. Uncomment export const runtime = "edge";
  5. Click "Trigger error"
  6. Cause logged ([cause]: Error: cause...)

Current vs. Expected behavior

Error causes should be included in the console log, like in the node.js runtime

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
  Available memory (MB): 15566
  Available CPU cores: 12
Binaries:
  Node: 22.11.0
  npm: 10.9.0
  Yarn: 1.22.22
  pnpm: 9.15.0
Relevant Packages:
  next: 15.1.2 // Latest available version is detected (15.1.2).
  eslint-config-next: 15.1.2
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Vercel (Deployed)

Additional context

I imagine the bug is somewhere in packages/next/src/server/patch-error-inspect.ts, but not sure

@juliesaia juliesaia added the bug Issue was opened via the bug report template. label Dec 22, 2024
@github-actions github-actions bot added the Runtime Related to Node.js or Edge Runtime with Next.js. label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant