Catch exception for dotnet temporal hosting

I used dotnet nuget package Temporalio.Extensions.Hosting to create hosted Temporal worker by:
services.AddHostedTemporalWorker()

Using this will cause the app crash when the Temporal service is stopped. Is it possible to make the app continue to run normally, just without using Temporal?

Event: BackgroundServiceFaulted
Exception: System.InvalidOperationException
Stack trace:

   at Temporalio.Bridge.Client.ConnectAsync(Runtime runtime, TemporalConnectionOptions options)
   at Temporalio.Client.TemporalConnection.GetBridgeClientAsync()
   at Temporalio.Client.TemporalConnection.ConnectAsync(TemporalConnectionOptions options)
   at Temporalio.Client.TemporalClient.ConnectAsync(TemporalClientConnectOptions options)
   at Temporalio.Extensions.Hosting.TemporalWorkerService.ExecuteAsync(CancellationToken stoppingToken)
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

In this case, it seems like connection is failing. This is a common hosed/background service like any other and so can fail like any other. If you don’t want a single background service to cause the rest of the host to fail, you can use the same approach you might with any other .NET service, it is not Temporal specific. This would probably mean providing your own implementation of BackgroundService/IHostedService that wraps/extends TemporalWorkerService and captures the exception, and then register that to the service collection instead of using AddHostedTemporalWorker.