I'd like to unify the way errors are returned from my web api.
With the introduction of AddProblemDetails this is pretty easy to do when a IAction returns a StatusCodeResult
The problem is i have hunderds of places where I already return a ObjectResult for example BadRequest("foo") and this just creates a text/plain response instead of the desired ProblemDetails. Is there any clean way to achieve this in a clean way,?
Or do i just need to override all usages of ObjectResult responses in ControllerBase?