Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jamesopstad
Copy link
Contributor

@jamesopstad jamesopstad commented Sep 12, 2025

Fixes #10499.

This captures errors thrown in the fetch handler of the default export of the entry Worker and sends them as a JSON response that is revived by Miniflare. This is the same method used by Wrangler and circumvents a workerd limitation that stack traces are not preserved across service bindings.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bug fix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not a Wrangler change

Copy link

changeset-bot bot commented Sep 12, 2025

🦋 Changeset detected

Latest commit: 5da9dd0

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin 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 Sep 12, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 5ef5897

@jamesopstad jamesopstad force-pushed the james/stack-traces branch 2 times, most recently from 29d95f0 to 372d68d Compare September 15, 2025 11:40
@jamesopstad jamesopstad changed the title Improve stack traces Improve error messages and stack traces Sep 15, 2025
@jamesopstad jamesopstad force-pushed the james/stack-traces branch 3 times, most recently from acbd721 to afedf37 Compare September 15, 2025 12:25
@jamesopstad jamesopstad marked this pull request as ready for review September 15, 2025 12:25
@jamesopstad jamesopstad requested review from a team as code owners September 15, 2025 12:25
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Sep 15, 2025
@jamesopstad jamesopstad added vite-plugin Relating to the `@cloudflare/vite-plugin` package skip-v3-pr Skip validation of presence of a v3 backport PR labels Sep 15, 2025
@jamesopstad jamesopstad merged commit 60631d5 into main Sep 15, 2025
56 of 62 checks passed
@jamesopstad jamesopstad deleted the james/stack-traces branch September 15, 2025 14:53
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-v3-pr Skip validation of presence of a v3 backport PR vite-plugin Relating to the `@cloudflare/vite-plugin` package
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Vite plugin obscuring error messages
3 participants