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
fix: fetch response status text #2588
Conversation
@@ -37,7 +38,7 @@ function createResponse(message) { | |||
|
|||
return new Response(responseBodyOrNull, { | |||
status: message.statusCode, | |||
statusText: message.statusMessage, | |||
statusText: STATUS_CODES[message.statusCode], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not?
statusText: STATUS_CODES[message.statusCode], | |
statusText: message.statusMessage || STATUS_CODES[message.statusCode], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Uzlopak I'm not against adding this, but from what I see, we never set this, so it will always be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say if STATUS_CODES[message.statusCode]
passes all our tests, I'd go with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small note: This is fetch-only code, so we don't have a big coverage here.
🎉 This PR is included in version 14.0.0-beta.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fix #2397 (comment)