Skip to content

Better error handling during download - #284

Merged
dhadka merged 1 commit into
masterfrom
promisify-pipeline
Apr 29, 2020
Merged

dhadka merged 1 commit into
masterfrom
promisify-pipeline

Conversation

@dhadka

@dhadka dhadka commented Apr 29, 2020

Copy link
Copy Markdown
Contributor

Improves error handling by using the same fix described in actions/toolkit#369.

For example, in the case the download stream is interrupted before all bytes are downloaded, this will raise the error Premature close. This should eliminate the need to check the content length header, but it also doesn't hurt to leave the content length check in place.

@dhadka
dhadka requested review from ericsciple and joshmgross April 29, 2020 13:37

@joshmgross joshmgross left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks!

@ericsciple

Copy link
Copy Markdown
Contributor

the promisified pipeline simplifies things quite a bit :) - fyi docs here: https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_stream_pipeline_streams_callback

@dhadka
dhadka changed the base branch from socket-timeout to master April 29, 2020 17:22
@dhadka
dhadka force-pushed the promisify-pipeline branch from 44d3fd8 to 1ed0c23 Compare April 29, 2020 17:24
@dhadka
dhadka merged commit 9f07ee1 into master Apr 29, 2020
@joshmgross
joshmgross deleted the promisify-pipeline branch April 29, 2020 18:55
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.

4 participants