Handle errors during connection phase