Closed
Description
From @tjrobinson on Friday, February 3, 2017 3:54:20 AM
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!
Copied from original issue: aspnet/Diagnostics#346
Metadata
Metadata
Assignees
Labels
Resolved because we decided not to change the behavior reported in this issue.Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesDiagnostic middleware and pages (except EF diagnostics)