handle cases where server throws connection refused