diff --git a/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs b/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs index d50e5f60c..c110be272 100644 --- a/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs +++ b/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs @@ -29,7 +29,9 @@ public static async Task TryRunWithLoggingAsync(this IHost host, Func await host.RunAsync(); return 0; } +#pragma warning disable CA1031 // Do not catch general exception types catch (Exception ex) +#pragma warning restore CA1031 // Do not catch general exception types { Log.Fatal(ex, "Host terminated unexpectedly"); return 1;