Adding robustness to server response handling.