Handle connection failure and request timeouts