I have a service that calls endpoints from a external API. I developed a custom middleware for handling possible exceptions from these API calls and logging them. However, a