-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Return errors from GetSession #1061
Conversation
@kontsevoy The only thing I am a little concerned with in this PR is that this might be expected behavior and this PR will break things unexpectedly. In a couple of places in the code it seems we look for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we log the error from GetSessions() though? I do not see it anywhere. Would like to avoid silent errors.
@russjones well... even if we return an error now, the returned session is still |
0ff29e2
to
97b5b8f
Compare
@kontsevoy I think we're logging it on some code paths. When I force an error in |
If '0' is provided as the default and the initial call to create a gateway fails, the user will be presented with an input that says 0. 0 is an invalid value though that this input will not accept. An empty string, on the other hand, is a perfectly valid value (the input doesn't have the `required` attribute). In that scenario, the backend will default the value to '0' and pick a random port.
If '0' is provided as the default and the initial call to create a gateway fails, the user will be presented with an input that says 0. 0 is an invalid value though that this input will not accept. An empty string, on the other hand, is a perfectly valid value (the input doesn't have the `required` attribute). In that scenario, the backend will default the value to '0' and pick a random port.
If '0' is provided as the default and the initial call to create a gateway fails, the user will be presented with an input that says 0. 0 is an invalid value though that this input will not accept. An empty string, on the other hand, is a perfectly valid value (the input doesn't have the `required` attribute). In that scenario, the backend will default the value to '0' and pick a random port.
Purpose
GetSession()
was hiding errors, this PR changes this behavior by returning errors other thantrace.NotFound
errors.Implementation
GetSession
to return nontrace.NotFound
errors.GetSessions
to propagate errors (this way we don't try and append anil
session to a slice).pollAndSync
propagate the error if either we have an error or if the session isnil
.Related Issues
Fixes #1002