Skip to content

Commit 7650fc4

Browse files
authored
Log inner exception message. (actions#4265)
1 parent bc00800 commit 7650fc4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Runner.Worker/ActionManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public sealed class ActionManager : RunnerService, IActionManager
111111
{
112112
// Log the error and fail the PrepareActionsAsync Initialization.
113113
Trace.Error($"Caught exception from PrepareActionsAsync Initialization: {ex}");
114-
executionContext.InfrastructureError(ex.Message, category: "resolve_action");
114+
executionContext.InfrastructureError(ex.InnerException?.Message ?? ex.Message, category: "resolve_action");
115115
executionContext.Result = TaskResult.Failed;
116116
throw;
117117
}
@@ -818,7 +818,7 @@ private async Task DownloadRepositoryActionAsync(IExecutionContext executionCont
818818
try
819819
{
820820
Trace.Info($"Found unpacked action directory '{cacheDirectory}' in cache directory '{actionArchiveCacheDir}'");
821-
821+
822822
// repository archive from github always contains a nested folder
823823
var nestedDirectories = new DirectoryInfo(cacheDirectory).GetDirectories();
824824
if (nestedDirectories.Length != 1)
@@ -832,14 +832,14 @@ private async Task DownloadRepositoryActionAsync(IExecutionContext executionCont
832832
IOUtil.DeleteDirectory(destDirectory, executionContext.CancellationToken);
833833
IOUtil.CreateSymbolicLink(destDirectory, nestedDirectories[0].FullName);
834834
}
835-
835+
836836
executionContext.Debug($"Created symlink from cached directory '{cacheDirectory}' to '{destDirectory}'");
837837
executionContext.Global.JobTelemetry.Add(new JobTelemetry()
838838
{
839839
Type = JobTelemetryType.General,
840840
Message = $"Action archive cache usage: {downloadInfo.ResolvedNameWithOwner}@{downloadInfo.ResolvedSha} use cache {useActionArchiveCache} has cache {hasActionArchiveCache} via symlink"
841841
});
842-
842+
843843
Trace.Info("Finished getting action repository.");
844844
return;
845845
}

0 commit comments

Comments
 (0)