api-problem-bundle
api-problem-bundle copied to clipboard
Limit transformation to a url regex
Would it be possible to limit the execution of the transformation to a route regular expression like ^/api/? So the transformation of the exceptions wouldn't occur on other places of the application which sometimes might throw an HttpException when accepting application/json but shouldn't be transformed.
This might be usefull for some applications which are not yet fully based on api's, or for some who want to migrate to newly structured api's
Hello @leroy0211,
Sound like a solid idea!
Maybe best to inject a RequestMatcherInterface into the listener so that you can do whatever matching you want.
I would surely accept a PR for that.