mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
do not fatal fail when azure devops token expires
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user