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: handle errors from the request body stream #1392

Merged
merged 3 commits into from Nov 19, 2021
Merged

Conversation

mdmitry01
Copy link
Contributor

@mdmitry01 mdmitry01 commented Nov 18, 2021

Purpose

node-fetch does not handle errors from the request body stream correctly. This PR fixes it.

Changes

body.pipe(dest) has been replaced with the pipeline function from the stream module.


  • I updated ./docs/CHANGELOG.md with a link to this PR or Issue
  • I added unit test(s)

test/main.js Outdated Show resolved Hide resolved
src/index.js Show resolved Hide resolved
test/main.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
LinusU
LinusU approved these changes Nov 19, 2021
Copy link
Member

@LinusU LinusU left a comment

Neat! 👍

@LinusU LinusU requested a review from jimmywarting Nov 19, 2021
@jimmywarting
Copy link
Collaborator

@jimmywarting jimmywarting commented Nov 19, 2021

hmm, this is something i know is going to change later at some point when we start to support whatwg streams...

@LinusU LinusU merged commit 2d5399e into node-fetch:main Nov 19, 2021
8 checks passed
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.

None yet

3 participants