handleError on connection failure