handle connect errors