Restore the ConnectionError handler

Fixes #755