Catch connection errors as well