-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
[undici] throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); #2307
Comments
Hi, @Acetyld. Thanks for reporting this. I looked at the repo briefly, your usage seems to be okay. This may be a bug in MSW. I will explore this in more detail once I have a moment. The error suggests that the underlying socket instance starts receiving a response whose status code is a non-configurable range (200 - 599):
You can log out that response header received on that line (just go to the build I'm quite curious what kind of response that may be. |
Cool, i tried looking int he builded js/mjs files but couldt reference it my self. |
Hi @kettanaito it all happens because of the websocket stuff I get a 201. |
Are you using WebSockets in tests? I wonder what triggers 101, to begin with. That has to be your tested code or your test environment. |
Yhea i created a full reproduction see I do nothing special in my opinion. Do you also get it with repro? Would love to hear =) |
For now ill use this as a patch-package |
same issue |
Prerequisites
Environment check
msw
versionNode.js version
v22.3.0
Reproduction repository
https://github.com/stichingsd-vitrion/msw_jest_undici_reproduction
Reproduction steps
Current behavior
Expected behavior
No errors recarding Undici
The text was updated successfully, but these errors were encountered: