Closed Bug 1866776 Opened 5 months ago Closed 4 months ago

Remove non-spec'ed error type "UnknownPath" from webdriver

Categories

(Testing :: geckodriver, defect, P3)

Firefox 119
defect

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: jameshendry05, Assigned: jameshendry05, Mentored)

References

Details

(Whiteboard: [lang=rust][webdriver:m9][webdriver:external])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0

Steps to reproduce:

The following code appears to be wrong:

https://searchfox.org/mozilla-central/source/testing/webdriver/src/error.rs#209

UnknownCommand | UnknownError => "unknown error",
UnknownMethod => "unknown method",
UnknownPath => "unknown command",

Especially when viewed in the content of:
https://searchfox.org/mozilla-central/source/testing/webdriver/src/error.rs#285

"unknown command" => UnknownCommand,
"unknown error" => UnknownError,

Actual results:

N/A

Expected results:

Perhaps Path and Command have been accidentally switched, and hence it should read:

UnknownPath | UnknownError => "unknown error",
UnknownMethod => "unknown method",
UnknownCommand => "unknown command",

Reading:
https://www.w3.org/TR/webdriver2/#errors
https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors

There is no mention of an UnknownPath error type. It also has no documentation within the code - unlike the rest of the the errors.
I failed to find any reference to UnknownPath outside of ErrorStatus, neither in webdriver nor geckodriver. So it looks like it might be an unecessary additional error type. Either way, UnknownCommand should certainly serialize and deserialize to "unknown command".

That's right! This kind of error is not specified and there is also no usage under /testing:
https://searchfox.org/mozilla-central/search?q=UnknownPath&path=testing%2F&case=false&regexp=false

I had a quick look why it was added but it reaches back quite far in history. the initial import from the GitHub repository:
https://hg.mozilla.org/mozilla-central/log/tip/testing/webdriver/src/error.rs?patch=&linerange=127:157

I would agree that we remove this error type.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: UnknownCommand and UnknownPath appear to be switched in webdriver → Remove non-spec'ed error type "UnknownPath" from webdriver

As discussed we should remove this. Do you want to work on it James?

Mentor: hskupin
Severity: -- → S3
Priority: -- → P3
Whiteboard: [lang=rust]
Assignee: nobody → jameshendry05
Status: NEW → ASSIGNED
Attachment #9368180 - Attachment description: Bug 1866776: Remove "UnknownPath" error (not in specification) from webdriver r=whimboo → Bug 1866776 - [webdriver] Remove "UnknownPath" error (not in specification) from webdriver r=whimboo
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39a48b872105
[webdriver] Remove "UnknownPath" error (not in specification) from webdriver r=webdriver-reviewers,jgraham
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Blocks: 1824713
Whiteboard: [lang=rust] → [lang=rust][webdriver:m9][webdriver:external]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: