Closed Bug 1362992 Opened 7 years ago Closed 7 years ago

Wrap Marionette implementation errors as ‘unknown error’ instead of ‘webdriver error’

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ato, Assigned: ato)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We currently wrap all Marionette implementation errors, such as TypeError/ReferenceError et al., as a generic WebDriverError.  The WebDriverError is encoded as with the ‘webdriver error’ error code, but it does not officially exist in the specification.

It is also a problem that we mask implementation errors as a generic error to the clients.  They should technically be encoded as UnknownError, which is closer to what they actually represent.
Blocks: webdriver
Assignee: nobody → ato
Status: NEW → ASSIGNED
Attachment #8865425 - Flags: review?(dburns)
Comment on attachment 8865425 [details]
Bug 1362992 - Wrap implementation errors as UnknownError

https://reviewboard.mozilla.org/r/137096/#review140266

::: testing/marionette/test_message.js:165
(Diff revision 2)
> +});
> +
> +add_test(function test_Response_sendError_body() {
> +  let resp = new Response(42, r => equal(null, r.body));
> +  resp.sendError(new WebDriverError());
> +

Do we have an assert that we can add to this test?
Comment on attachment 8865425 [details]
Bug 1362992 - Wrap implementation errors as UnknownError

https://reviewboard.mozilla.org/r/137096/#review140266

> Do we have an assert that we can add to this test?

The assertion happens in the response handler callback that is passed as the second argument to Response:

> r => equal(null, r.body)

This tests that the body that is passed to the function responsible for sending the response over the transport socket is empty.
Comment on attachment 8865425 [details]
Bug 1362992 - Wrap implementation errors as UnknownError

https://reviewboard.mozilla.org/r/137096/#review142042
Attachment #8865425 - Flags: review?(dburns) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99102478f0c7
Wrap implementation errors as UnknownError r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/99102478f0c7
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: