Switch from InnerException to ErrorCode on disableupdate check (#2718)

This commit is contained in:
Nikola Jokic
2023-08-10 16:27:42 +02:00
committed by GitHub
parent b882f6696a
commit 6680a3b142
3 changed files with 3 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ namespace GitHub.Runner.Listener
Trace.Info("Runner OAuth token has been revoked. Unable to pull message.");
throw;
}
catch (AccessDeniedException e) when (e.InnerException is InvalidTaskAgentVersionException)
catch (AccessDeniedException e) when (e.ErrorCode == 1)
{
throw;
}