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

Refactor HttpFetchPlugin to clarify error outcomes #1532

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

chrisfillmore
Copy link
Contributor

Previously, HttpFetchPlugin would treat any non-Shaka error as
HTTP_ERROR when there were potentially other circumstances which
could have produced a non-Shaka error.

This change catches errors from fetch sooner, so that there is no
need to do a fuzzy check for error.severity. It also clears the
request timeout regardless of whether fetch throws or not.

Closes #1519

Previously, HttpFetchPlugin would treat any non-Shaka error as
HTTP_ERROR when there were potentially other circumstances which
could have produced a non-Shaka error.

This change catches errors from fetch sooner, so that there is no
need to do a fuzzy check for error.severity. It also clears the
request timeout regardless of whether fetch throws or not.

Closes shaka-project#1519
* @param {number|undefined} timeoutId
* @return {!Promise<!shaka.extern.Response>}
*/
shaka.net.HttpFetchPlugin.request_ = async function(uri, requestType, init,
Copy link
Member

Choose a reason for hiding this comment

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

I ❤️ async

@shaka-bot
Copy link
Collaborator

All tests passed!

@joeyparrish joeyparrish merged commit 07fa824 into shaka-project:master Aug 14, 2018
joeyparrish pushed a commit that referenced this pull request Aug 22, 2018
Previously, HttpFetchPlugin would treat any non-Shaka error as
HTTP_ERROR when there were potentially other circumstances which
could have produced a non-Shaka error.

This change catches errors from fetch sooner, so that there is no
need to do a fuzzy check for error.severity. It also clears the
request timeout regardless of whether fetch throws or not.

Backported to v2.4.x

Closes #1519
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants