diff --git a/src/SQLInsight.Agent/Configuration/AgentRequestService.cs b/src/SQLInsight.Agent/Configuration/AgentRequestService.cs index 297fe86..37da56e 100644 --- a/src/SQLInsight.Agent/Configuration/AgentRequestService.cs +++ b/src/SQLInsight.Agent/Configuration/AgentRequestService.cs @@ -104,7 +104,9 @@ public sealed partial class AgentRequestService( { error = $"Agenten fik ikke svar inden for {RequestTimeout.TotalMinutes:0} minutter."; } - catch (Exception ex) when (ex is CredentialException or KeyNotFoundException or InvalidOperationException or DiscoveryFailedException or DbException) + // Anything else (a lock timeout, a repository error while storing a discovery …) is the request's result too, so it + // is never left as Running for the web UI to wait on. + catch (Exception ex) when (ex is not OperationCanceledException) { error = ex.Message; }