w3c / w3c/webdriver

New Session leaks "invalid argument"

Open
#1,408 1 comment 0 reactions 1 assignee View on GitHub

@shs96c is already working on this.

Since Apr 4, 2019.

New Session question
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

The intent of the New Session algorithm (as made clear in step 2) is for a failure to create a session to result in an error of "session not created" being returned. My belief is that all implementations follow this expected behaviour.

However, a close reading of the spec shows that step 4 of the main algorithm "tries" to process the capabilities. There are several paths through this algorithm that cause an "invalid argument" to be returned, which, given the way that Step 4 is written, will bubble back to the end user.

The simplest fix is to indicate that the returned "invalid parameter" is passed back as the "data" section of the "session not created" error, which allows the information to be returned to the user in a meaningful way. The alternative is to allow two kinds of error to be returned by the algorithm, but this will break expected results and widespread implementations.

Opening this to the floor for discussion, but I am happy to write up the decision we take.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.