do not fatal fail when azure devops token expires

This commit is contained in:
13xforever
2025-12-19 08:13:04 +05:00
parent 63af6f83cb
commit 9b60caae97

View File

@@ -311,9 +311,17 @@ internal static class Config
if (string.IsNullOrEmpty(AzureDevOpsToken))
return null;
var azureCreds = new VssBasicCredential("bot", AzureDevOpsToken);
var azureConnection = new VssConnection(new Uri("https://dev.azure.com/nekotekina"), azureCreds);
return azureConnection.GetClient<BuildHttpClient>();
try
{
var azureCreds = new VssBasicCredential("bot", AzureDevOpsToken);
var azureConnection = new VssConnection(new Uri("https://dev.azure.com/nekotekina"), azureCreds);
return azureConnection.GetClient<BuildHttpClient>();
}
catch (Exception e)
{
Log.Error(e, "Failed to authenticate");
return null;
}
}
public static TelemetryClient? TelemetryClient