private async Task UpdateAgentUpdateStateAsync(string currentState) { _terminal.WriteLine(currentState); try { await _agentServer.UpdateAgentUpdateStateAsync(_poolId, _agentId, currentState); } catch (VssResourceNotFoundException) { // ignore VssResourceNotFoundException, this exception means the agent is configured against a old server that doesn't support report agent update detail. Trace.Info($"Catch VssResourceNotFoundException during report update state, ignore this error for backcompat."); } catch (Exception ex) { Trace.Error(ex); Trace.Info($"Catch exception during report update state, ignore this error and continue auto-update."); } }