VaultSharp.Extensions.Configuration icon indicating copy to clipboard operation
VaultSharp.Extensions.Configuration copied to clipboard

Could it be a good idea to add a try catch in the VaultChangeWatcher?

Open CodeLover254 opened this issue 1 year ago • 2 comments

After using this package for a while, I have noticed the entire application stops whenever the VaultChangeWatcher background service encounters an exception. Mostly task cancelled exceptions due to http client timeout. I have the option of setting HostOptions.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore but that will not restart the VaultChangeWatcher afterwards. @MrZoidberg, any thoughts on this? Thinking of having a task delay in case of an exception after which the background service will continue running.

CodeLover254 avatar Jun 12 '24 09:06 CodeLover254

Hi,

Thanks for your feedback. Yeah, it's worth changing. I'm a bit overloaded right now and will be able to work on this next week. But feel free to create a PR.

Thanks!

MrZoidberg avatar Jun 12 '24 10:06 MrZoidberg

Hello. No worries. I will work on the PR.

CodeLover254 avatar Jun 12 '24 11:06 CodeLover254