❔ Some help configuration hellang problemdetails middleware
For those of oyu using hellang problem details middleware, did you configure it a lot? Should I make custom mapping for more specific exception types like StripeExceptions? If a CardException is thrown, I might wanna display that to the user. But currently, any exceptions not specified to be mapped by hellang default configuration are mapped to 500, which doesn't seem right for the example above.
Or should I handle exceptions locally whenever I'm making external api calls or relying on external libraries?
There's a lot of different approaches to exceptions, but i like the idea of a global exception handler... so I'd like to avoid handling exceptions locally. I'll do retries to minimize transient errors though.
And secondly, hellang middleware is mainly for http requests right? will it even catch exceptions throw in out of process methods like hangfire background jobs etc? Do I need a custom global exception handler for that or should I just deal with it locally?
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.