Skip to content

Commit

Permalink
Bug 1887644 - Throw "UnsupportedOperation" error instead "InvalidArgu…
Browse files Browse the repository at this point in the history
…ment" when a file in "input.setFiles" command doesn't exist. r=webdriver-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D211344
  • Loading branch information
lutien committed May 24, 2024
1 parent a87136c commit 8c5fc75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remote/webdriver-bidi/modules/windowglobal/input.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class InputModule extends WindowGlobalBiDiModule {
try {
fileObjects.push(await File.createFromFileName(file));
} catch (e) {
throw new lazy.error.InvalidArgumentError(
throw new lazy.error.UnsupportedOperationError(
`Failed to add file ${file} (${e})`
);
}
Expand Down

0 comments on commit 8c5fc75

Please sign in to comment.