I am trying to implement request-response logging middleware in asp.net core web API application. It\'s working as fine in normal flow. But on an exception in the application, s