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.
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.
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?
@minrk, now that #955 has been merged, should we close this one? Or do you have anything else in mind for it?
Yes, #955 was meant to cover this. Closing.