catch connection refused exception