-
Notifications
You must be signed in to change notification settings - Fork 156
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
TypeError: Failed to construct 'Response': Response with null body status cannot have body #116
Comments
A null body status is a status that is 101, 204, 205, or 304. |
@jpillora I think this is a fairly tiny fix, would you be able to fix it or if I contribute a PR would you be able to do a release that includes it? It should basically just be making sure we pass a null or undefined body to the Response constructor if the status is any of the given codes. |
- Null body is now used for status codes 101, 204, 205, and 304. - See jpillora#116 (comment)
This issue is causing runtime errors in our project so I forked xhook and made the necessary fixes and submitted PR. We will be pointing to the fork until this change is merged / published. |
See pinned issue at the top
https://github.com/jpillora/xhook/issues
…On Sat, 7 Nov 2020 at 9:57 am Cole Chamberlain ***@***.***> wrote:
This issue is causing runtime errors in our project so I forked xhook and
made the necessary fixes and submitted PR. We will be pointing to the fork
until this change is merged / published.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE2X4ZDYVPXMYD65MWDKMTSOR5PNANCNFSM4RNURYXQ>
.
|
TypeError: Failed to construct 'Response': Response with null body status cannot have body
xhook/src/xhook.coffee
Line 561 in 8b9b595
Some status codes (ex. 204) require having no body set (null/undefined), however this statement falls back to what I believe is an empty string if no body is returned, causing the constructor call to fail and making it impossible to properly respond to these.
The text was updated successfully, but these errors were encountered: