Skip to content

fix(miniflare): improve error logging to include error causes in stack traces #9843

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edmundhung
Copy link
Member

@edmundhung edmundhung commented Jul 3, 2025

Fixes DEVX-1977

This makes miniflare logging the full error stack traces in one single log for better visibility.

Before:

Screenshot 2025-07-03 at 16 26 07

After:

Screenshot 2025-07-03 at 16 17 22

Copy link

changeset-bot bot commented Jul 3, 2025

🦋 Changeset detected

Latest commit: b9fda7d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
wrangler Patch
miniflare Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
@cloudflare/pages-shared Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jul 3, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@9843

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@9843

miniflare

npm i https://pkg.pr.new/miniflare@9843

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@9843

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@9843

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@9843

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@9843

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@9843

wrangler

npm i https://pkg.pr.new/wrangler@9843

commit: b9fda7d

@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch from 11f279f to 00bfeb1 Compare July 4, 2025 12:23
@edmundhung edmundhung changed the title fix(miniflare): improve log formatting with error cause fix(miniflare): error logging to include error causes in stack traces Jul 4, 2025
@edmundhung edmundhung changed the title fix(miniflare): error logging to include error causes in stack traces fix(miniflare): improve error logging to include error causes in stack traces Jul 4, 2025
@edmundhung edmundhung marked this pull request as ready for review July 4, 2025 12:49
@edmundhung edmundhung requested a review from a team as a code owner July 4, 2025 12:49
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch 2 times, most recently from 1437390 to de2d25d Compare July 7, 2025 11:10
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main edmundhung/DEVX-1977 might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-9843
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@emily-shen
Copy link
Contributor

what if we hid the middleware stack trace entirely? its not really relevant to the user.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 8, 2025
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch from dbb28eb to de2d25d Compare July 8, 2025 14:02
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch from de2d25d to 0ca0bfe Compare July 8, 2025 16:13
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch from 2c538d4 to ce2cb38 Compare July 9, 2025 14:55
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1977 branch from ce2cb38 to b9fda7d Compare July 9, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

3 participants