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

fix: body used already error fix #340 #346

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

Ephigenia
Copy link
Contributor

Fix "body used already for" error message as json and text is called. Should fix #340

@@ -42,10 +42,11 @@ class FetchAdapter {
if (fullResponse) {
return res;
}
const rawResponseBody = res.text();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need an await here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the await

@nchaulet nchaulet merged commit 26af5e0 into nchaulet:main Jun 19, 2024
3 checks passed
@nchaulet
Copy link
Owner

Thanks for the contribution I will publish a new version with that change later this week

@kamieniarz
Copy link

Hey @nchaulet, any chance you could release new version with this fix?

@nrathi
Copy link
Contributor

nrathi commented Jul 25, 2024

+1, I don't think a new version was published alongside my fix a few months ago. I've still been using my patch.

e225f77

@nrathi
Copy link
Contributor

nrathi commented Aug 7, 2024

@nchaulet can you please publish a new version with my commit and the one from @kamieniarz ?

@nchaulet
Copy link
Owner

nchaulet commented Aug 8, 2024

Just published a new version 4.4.0 with your changes

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.

Fetch adapter should not call body.text() if body.json() throws an error
4 participants