This commit is contained in:
Tingluo Huang
2026-07-07 17:03:24 -04:00
parent d5ece38fc9
commit d49c9f222d

View File

@@ -1061,17 +1061,17 @@ namespace GitHub.Runner.Worker
catch (Exception ex) when (ex is OperationCanceledException && token.IsCancellationRequested)
{
Trace.Error($"DNS resolution canceled: {ex}");
result.StatusCode = "dns_canceled";
result.DNSError = "dns_canceled";
}
catch (Exception ex) when (ex is OperationCanceledException && timeoutTokenSource.IsCancellationRequested)
{
Trace.Error($"DNS resolution timeout: {ex}");
result.StatusCode = "dns_timeout";
result.DNSError = "dns_timeout";
}
catch (Exception ex)
{
Trace.Error($"Catch exception during DNS resolution: {ex}");
result.StatusCode = $"dns_{ex.Message}";
result.DNSError = $"dns_{ex.Message}";
}
}
@@ -1287,6 +1287,8 @@ namespace GitHub.Runner.Worker
public int HttpRequestDurationInMs { get; set; }
public int DNSResolutionDurationInMs { get; set; }
public string DNSError { get; set; }
}
}
}