Skip to content
This repository

Need user-facing warning in the browser if websocket connection fails #952

Closed
fperez opened this Issue · 4 comments

2 participants

Fernando Perez Min RK
Fernando Perez
Owner

See #934 for more background. Right now if the websocket connection fails for any reason, the users are left with a mysteriously non-working notebook that appears to otherwise be ok, so it's quite hard to debug. We should propagate the error to the browser.

Min RK
Owner

Sorry, I missed the sub-issue note in #934. GitHub has been finicky about auto-closing issues recently, so I saw that the title was fully addressed and confirmed as fixed, and thought it was another one of those.

For reference: The websocket version-check error code is #426. I'm not sure what the errors are in the host-mismatch error case.

Min RK
Owner

I've got a local version working that throws an alert (only tested in Chrome so far). The thing to catch is websocket.onclose, and check event.wasClean. For some reason, the actual responsecode doesn't seem to be available, but this does seem to catch both cases of the 426 error, and the bug preventing websocket urls from matching the http one.

@ellisonbg - is there a reason that the hostname/port of the websocket connection should not just match that of the http connection?

Fernando Perez
Owner

@minrk, now that #955 has been merged, should we close this one? Or do you have anything else in mind for it?

Min RK minrk closed this
Min RK
Owner

Yes, #955 was meant to cover this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.