Exceptions, Troubleshooting, and Documenting
This chapter covers dealing with exceptions in ASP.NET Web API, debugging issues with ASP.NET Web API tracers, and documenting your API endpoints with the ASP.NET Web API Help Page library.
You will learn how to do the following:
- Handle and log exceptions (Recipes 7-1, 7-2, and 7-3)
- Use Web API tracers (Recipes 7-4, 7-5, and 7-6)
- Write a custom Web API tracer (Recipe 7-7)
- Add a Web API help page (Recipe 7-8)
- Customize a Web API help page (Recipes 7-9, 7-10, and 7-11)
7-1. Handle Exceptions with Filters
You need a simple mechanism for handling exceptions that might occur in your controllers’ ...