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

Error codes #201

Closed
sanbornhilland opened this issue Oct 9, 2015 · 9 comments
Closed

Error codes #201

sanbornhilland opened this issue Oct 9, 2015 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@sanbornhilland
Copy link
Contributor

Can we add error codes to the major Shaka errors so that they are easy to map? We are in a position where we want to funnel Shaka errors through our own application error pipeline so that we can have a consistent error interface. But it's difficult to map to our own error codes because the errors only contain messages which might change.

@joeyparrish joeyparrish added the type: enhancement New feature or request label Oct 12, 2015
@joeyparrish
Copy link
Member

This is a great idea. We'll be sure to add this to the design for v2.0.

@joeyparrish joeyparrish self-assigned this Oct 22, 2015
@joeyparrish joeyparrish added this to the Future milestone Oct 22, 2015
joeyparrish added a commit that referenced this issue Dec 6, 2015
This error type will be used for all internal errors, and will rely
on numeric error codes which can be easily checked by the application.

This also changes PSSH parsing to throw on errors instead of retaining
partial data.

Issue #201
b/25306826

Change-Id: I19d23d99d4ee72cb31fe5f233bac57a3a9cfc283
@joeyparrish joeyparrish modified the milestones: v2.0.0, v2.0-beta Jan 5, 2016
@joeyparrish
Copy link
Member

Finished in 6231488. All reported errors in v2.0 are shaka.util.Error type. They have a category (network, media, drm, etc.) and a specific error code, both of which are numerical and fully-documented.

@sanbornhilland
Copy link
Contributor Author

This great. The hard work is much appreciated.

@sanbornhilland
Copy link
Contributor Author

Now that I'm looking at this more closely I do have a quick question. You mention a DRM category in your comment but there isn't a DRM category in the Error.Category object. Is there a plan to add error codes for this in the future? One of the problems that we have had is recognizing DRM errors because no codes are provided and error messages seem to be changing often. Do you have any thoughts on this?

@joeyparrish
Copy link
Member

The new DrmEngine is still a work-in-progress and hang been published yet. But we will have a DRM error category and specific codes for various errors.

There are not standard error codes for CDMs in the EME spec, but we will try to divine as much as we can when we can. For the rest, we will include error strings from the CDM. Hopefully, we can get the important stuff.

What situations are important to you?

@sanbornhilland
Copy link
Contributor Author

Okay, great.

The lack of standard error codes is something we have been trying to determine how to handle.

We are interested in stuff like:

  • DRM is disabled
  • License is expired
  • License can’t be installed

But I'm not even sure if these are all possible to recognize or if error messages are the best we will get.

Do you have an idea about what the cross browser support will be for these? Is it possible to determine these things consistently across browsers?

@joeyparrish
Copy link
Member

  • I'm not sure we can know from JS that DRM is disabled. At most, we could know that none of the application's requested key system configurations are available. (Unavailable may mean disallowed by the user in the case of persistent licenses, but we won't know the difference.)
  • License expiration is easy and cross-browser.
  • What does it mean that a license "can't be installed"? Malformed data or something otherwise rejected by the CDM?

@sanbornhilland
Copy link
Contributor Author

Yeah, basically, you get something back from the license server but it's rejected by the CDM.

@joeyparrish
Copy link
Member

That should be trivial and cross-platform. The Promise returned by update() would be rejected in that case.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
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: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants