From 9b60caae97008bb22410e117fef9609ebdd79899 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Fri, 19 Dec 2025 08:13:04 +0500 Subject: [PATCH] do not fatal fail when azure devops token expires --- CompatBot/Config.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CompatBot/Config.cs b/CompatBot/Config.cs index 34d2eb1e..4d5a59fd 100644 --- a/CompatBot/Config.cs +++ b/CompatBot/Config.cs @@ -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(); + try + { + var azureCreds = new VssBasicCredential("bot", AzureDevOpsToken); + var azureConnection = new VssConnection(new Uri("https://dev.azure.com/nekotekina"), azureCreds); + return azureConnection.GetClient(); + } + catch (Exception e) + { + Log.Error(e, "Failed to authenticate"); + return null; + } } public static TelemetryClient? TelemetryClient