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

Status undefined in Response constructor #84

Closed
gzuidhof opened this issue Nov 4, 2021 · 3 comments
Closed

Status undefined in Response constructor #84

gzuidhof opened this issue Nov 4, 2021 · 3 comments
Labels
dependency Issue in dependency fixed-in-next Fixed in next release

Comments

@gzuidhof
Copy link

gzuidhof commented Nov 4, 2021

I found a small inconsistency, in the browser or Cloudflare Worker this is valid:

new Reponse("", {status: undefined});

And results in a status 200 response, in Miniflare it's a TypeError without a message.

@mrbbot
Copy link
Contributor

mrbbot commented Nov 11, 2021

Hey! 👋 This looks like an error in undici, the package Miniflare uses to provide fetch, Response, etc. I'd suggest you open an issue there. 🙂

import { Response } from "undici";
new Response("", { status: undefined }); // throws TypeError

@mrbbot mrbbot added the dependency Issue in dependency label Nov 11, 2021
@gzuidhof
Copy link
Author

gzuidhof commented Nov 17, 2021

I submitted a PR and it got approved and merged 🥳 nodejs/undici#1100. I'll ping here again when a new release is minted.

mrbbot added a commit that referenced this issue Nov 20, 2021
@mrbbot mrbbot added the fixed-in-next Fixed in next release label Nov 20, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Nov 22, 2021

Hey! 👋 miniflare@2.0.0-rc.2 has just been released, including the fix for this. You can find the changelog here.

@mrbbot mrbbot closed this as completed Nov 22, 2021
mrbbot added a commit that referenced this issue Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Issue in dependency fixed-in-next Fixed in next release
Projects
None yet
Development

No branches or pull requests

2 participants