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

Errors from ready() promise do not contain status code #168

Closed
rijk opened this issue Oct 2, 2017 · 1 comment
Closed

Errors from ready() promise do not contain status code #168

rijk opened this issue Oct 2, 2017 · 1 comment
Labels
enhancement New feature or request

Comments

@rijk
Copy link

rijk commented Oct 2, 2017

More info in #165.

While trying to find a way to catch errors during instantiation of the player, we found the following workaround:

player = new Vimeo.Player( ... )
player.ready().catch(...)

However, the errors thrown here are of appalling quality; they just contain a message, no code, no name. Therefore, attempting to interpret these errors to produce a more understandable error message for the user would force us to use a brittle system of running a regex on the error message.

Expected Behavior

The errors thrown by the ready() method follow the loadVideo() API.

Actual Behavior

Useless error.

Steps to Reproduce

player = new Vimeo.Player( ... ) // with private or deleted video (403/404)
player.ready().catch(...)
@rebecca-sich rebecca-sich added the enhancement New feature or request label Feb 22, 2018
@luwes
Copy link
Contributor

luwes commented Jan 9, 2019

The player.ready() method should now have promise rejections with more detailed error messages during initialization. NotAllowedError, PrivacyError, for the rest Error.

@luwes luwes closed this as completed Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants