Handle connection failures