Skip to content

Conversation

@dom96
Copy link
Contributor

@dom96 dom96 commented Nov 14, 2025

Something I ran into and found confusing. If you attempt to construct a Response with status code 101 and fail to pass in a web socket to the constructor you'll be met with a "Responses may only be constructed with status codes in the range 200 to 599, inclusive". Which implies that constructing a Response with a status code of 101 is not allowed.

Looks like others found it confusing too:

https://community.cloudflare.com/t/cant-return-status-101-for-websocket/428883

This simple change should make this a little bit more user friendly.

@dom96 dom96 requested a review from jasnell November 14, 2025 17:25
@dom96 dom96 requested review from a team as code owners November 14, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants