Explore if leveraging the [IExceptionHandler](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-5/#iexceptionhandler) interface/feature can help simplify the library and reduce the codebase.