Fetch() call to localhost from locally running worker fails

For Workers & Pages, what is the name of the domain?

(locally running via wrangler dev)

What is the error number?

500

What is the error message?

{“error”:true,“message”:“internal error; reference = h1kihtbmqr5jq5edtjhttgcs”}

What is the issue or error you’re encountering

Using wrangler 4.6.0, making a fetch() call from a worker to localhost:8888 fails

What steps have you taken to resolve the issue?

I can access https://localhost:8888/my/resource using curl as well as a browser without issue; but a fetch() call from a locally running worker via wrangler dev fails with a 500 internal error. I also tried IP address 127.0.0.1 with the same result. Might there be a command line arg or config option I’m missing?

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.