You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 8, 2018. It is now read-only.
Currently, a fair amount of configuration is required to report errors in a native format for pages vs. web API. It would be nice to have the following features:
A way to tell MVC what routes go to pages vs. APIs.
Automatic response of HTML error pages for page routes, and empty-or-JSON bodies for API routes.
Inclusion of status codes from exceptions in API responses (avoids the need to always use IActionResult, which minimizes friction in unit testing web API methods).
Automatic suppression of authentication redirects for API routes.
Currently, I provide these features like this (and like this for redirects, but it seems like something that would be quite useful to have baked in from the start.