add generic connect error handler