Closed tjrobinson closed 6 years ago
Feels like we could do this as part of the new API work @rynowak.
/cc @Eilon
https://tools.ietf.org/html/rfc7807
And then you want formatters and get bit by the layering bug 😆
This issue was moved to aspnet/Home#2590
We're using the DeveloperExceptionPageMiddleware and it would be really useful if it could be changed/configured so that AJAX requests to APIs, e.g. from an Angular application were given a JSON response back instead of HTML. This would make the response much more readable when using F12 tools or testing the API through other non-browser tools like Postman.
I hope that's enough information to make sense, let me know if not.
There's a similar problem discussed here: http://stackoverflow.com/questions/35245893/mvc-6-webapi-returning-html-error-page-instead-of-json-version-of-exception-obje
Thanks!