Open InstyleVII opened 6 years ago
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
.
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.
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.
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).