Show a client error if the WebSocket connection closes

Instead of automatically reconnecting when the WebSocket connection dies for whatever reason, we show an error asking that the user refresh.

This PR also DRYs out our existing error handling a bit.
Good idea.