Trace x-github-request-id when download action tarball. (#2755)

This commit is contained in:
Tingluo Huang
2023-08-15 19:00:54 -04:00
committed by GitHub
parent d88823c634
commit 4f40f29cff
5 changed files with 32 additions and 20 deletions
+8 -3
View File
@@ -5,8 +5,8 @@ namespace GitHub.Runner.Worker
{
public class ActionNotFoundException : Exception
{
public ActionNotFoundException(Uri actionUri)
: base(FormatMessage(actionUri))
public ActionNotFoundException(Uri actionUri, string requestId)
: base(FormatMessage(actionUri, requestId))
{
}
@@ -25,8 +25,13 @@ namespace GitHub.Runner.Worker
{
}
private static string FormatMessage(Uri actionUri)
private static string FormatMessage(Uri actionUri, string requestId)
{
if (!string.IsNullOrEmpty(requestId))
{
return $"An action could not be found at the URI '{actionUri}' ({requestId})";
}
return $"An action could not be found at the URI '{actionUri}'";
}
}