Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs
Posted by: Rick Strahls WebLog,
on 17 Oct 2016 |
View original | Bookmarked: 0 time(s)
While working on my ASP.NET Core API and Angular 2.0 AlbumViewer sample, one last thing I need to round out the feature set is to make sure that consistent error results are returned to the client. Unhandled errors should also be logged to disk for later reference.
ASP.NET Core does not provide a consistent error response for API errors out of the box. In fact, an error in an API results in the same error result as any other type controller result - an HTML error page (which you can configure) or...