This repository was archived by the owner on Dec 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
DeveloperExceptionPageMiddleware always returns HTML, sometimes JSON would be better #346
Labels
Comments
https://tools.ietf.org/html/rfc7807 And then you want formatters and get bit by the layering bug 😆 |
This was referenced Jan 1, 2018
This issue was moved to dotnet/aspnetcore#2590 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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!
The text was updated successfully, but these errors were encountered: