Catch connection error.