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

Support protocol extension of errors #1151

Open
InstyleVII opened this issue Nov 21, 2017 · 3 comments
Open

Support protocol extension of errors #1151

InstyleVII opened this issue Nov 21, 2017 · 3 comments
Milestone

Comments

@InstyleVII
Copy link
Contributor

We currently allow protocol extensions for both capabilities and commands, but not for errors. As we're encouraging different working groups to create their own custom endpoints/capabilities (as well as allowing user agents to define their own) it only makes sense to also allow them to define their own errors for those custom endpoints (vendor specific or working group specific).

@andreastt andreastt added this to the Level 2 milestone Nov 21, 2017
@andreastt
Copy link
Member

A data point is that geckodriver currently (mis)uses the unknown error code when failing to install addons through the extension command /session/{session id}/moz/addon/install.

@InstyleVII
Copy link
Contributor Author

Yeah I think that's a poor solution for developers that we should address via allowing extension errors. We use unknown error as well for some of our vendor-specific errors (or the closest webdriver equivalent) but it would be nice if we could be more specific.

@jugglinmike
Copy link
Contributor

In the "Automation" section of the Permissions API, we worked around this by using (maybe over-using) the generic "invalid argument" error. As more web APIs introduce automation sections of their own, we'll either see a profusion of these generic error responses or new error codes introduced in an ad-hoc way. The latter is under consideration in the Generic Sensors API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants