[BACKLOG-796] prevent browser freeze on invalid connection

avoiding event loop and showing generic error message
Merge pull request #564 from tgf/backlog796_5.2

[BACKLOG-796] prevent browser freeze on invalid connection