Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Session leaks "invalid argument" #1408

Open
shs96c opened this issue Apr 2, 2019 · 1 comment
Open

New Session leaks "invalid argument" #1408

shs96c opened this issue Apr 2, 2019 · 1 comment

Comments

@shs96c
Copy link
Contributor

shs96c commented Apr 2, 2019

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.

@shs96c
Copy link
Contributor Author

shs96c commented Apr 4, 2019

After discussion, the suggested way forward is to ensure we return "session not created", but to include information about the "invalid parameter" in the "data" section of the response.

@shs96c shs96c self-assigned this Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant