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

Intercepting non-fatal errors during .load() #4484

Closed
martinstark opened this issue Sep 14, 2022 · 1 comment · Fixed by #4983
Closed

Intercepting non-fatal errors during .load() #4484

martinstark opened this issue Sep 14, 2022 · 1 comment · Fixed by #4983
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@martinstark
Copy link
Contributor

martinstark commented Sep 14, 2022

Have you read the Tutorials?
yes

Have you read the FAQ and checked for duplicate open issues?
yes

What version of Shaka Player are you using?
4.2.1

Please ask your question
We have a specific issue where we want to skip retry logic and fail immediately if a VOD manifest request responds with 404. We've been unable to find a way of making this possible. What we've tried:

  • registerResponseFilter() -> response filters do not get access to 40X responses
  • player.load().catch() -> catch does not trigger until all retries have been made and a fatal error is thrown
  • player.addEventListener("error", ...) -> this is too late to start listening to manifest request errors
  • we've not found a way to listen to RetryEvent
  • we don't create our own instance of NetworkingEngine so cannot provide it with a onDownloadFailed argument

There seems to be no obvious way of getting access to severity: 1 network errors during the load call. We want retries for other types of manifest failures, but on a 404 we know that we can fail immediately.

@martinstark martinstark added the type: question A question from the community label Sep 14, 2022
@martinstark martinstark reopened this Sep 14, 2022
@martinstark
Copy link
Contributor Author

martinstark commented Sep 14, 2022

Found out by reading the source that NetworkingEngine extends FakeEventTarget, and as such has a .addEventListener method, and it has the request type and the shaka error, which allows us to create custom logic around non-fatal errors.

Is there an easier way of achieveing what we're trying to do than parsing the error object in the RetryEvent? Like getting 40X responses to pass through response filters.

joeyparrish pushed a commit that referenced this issue Mar 1, 2023
Shaka error handling is getting increasingly more complex in order to "catch them all".
This new tutorial describes both the basic method of error handling, as well as showing a few
more advanced ways to handle specific errors.

Closes #4484
joeyparrish pushed a commit that referenced this issue Mar 1, 2023
Shaka error handling is getting increasingly more complex in order to "catch them all".
This new tutorial describes both the basic method of error handling, as well as showing a few
more advanced ways to handle specific errors.

Closes #4484
joeyparrish pushed a commit that referenced this issue Mar 1, 2023
Shaka error handling is getting increasingly more complex in order to "catch them all".
This new tutorial describes both the basic method of error handling, as well as showing a few
more advanced ways to handle specific errors.

Closes #4484
joeyparrish pushed a commit that referenced this issue Mar 2, 2023
Shaka error handling is getting increasingly more complex in order to "catch them all".
This new tutorial describes both the basic method of error handling, as well as showing a few
more advanced ways to handle specific errors.

Closes #4484
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 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 type: question A question from the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant