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

🐛 BUG: Error loop/hang with passThroughOnException and no host #7356

Open
GregBrimble opened this issue Nov 26, 2024 · 0 comments
Open

🐛 BUG: Error loop/hang with passThroughOnException and no host #7356

GregBrimble opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something that isn't working

Comments

@GregBrimble
Copy link
Member

Which Cloudflare product(s) does this pertain to?

Wrangler

What version(s) of the tool(s) are you using?

3.91.0

What version of Node are you using?

No response

What operating system and version are you using?

macOS

Describe the Bug

Setup

wrangler.toml
src/
  index.js
# ./wrangler.toml
name = "my-app"
main = "./src/index.js"
compatibility_date = "2024-11-26"
// ./src/index.js

export default {
  fetch(request, env, ctx) {
    ctx.passThroughOnException();
    throw new Error("bang");
  }
}

Observed behavior

  1. npx wrangler dev --no-bundle --host example.com

  2. curl http://localhost:8787/

  3. Error twice(?) in Wrangler and return example.com response to cURL

  4. npx wrangler dev --no-bundle

  5. curl http://localhost:8787/

  6. Error loop in Wrangler and hang waiting for a response in cURL

Expected behavior

  • With a --host, error just once(?)
  • Without a --host, I have no idea...? Error once in Wrangler and return a null-body 500-status response for cURL?

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

Some behind-the-scenes chat about this: https://cflare.co/passthru

@GregBrimble GregBrimble added the bug Something that isn't working label Nov 26, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant