adder some eror handling for failed connect/disconnect events