connect err handling.