Debugging and Error Handling in ASP.NET Core Web API
Learn how to properly handle errors in .NET Web API projects. This course will teach you how to apply different error handling techniques for different scenarios in real applications to create a rich consumer experience.
What you'll learn
Working on large-scale APIs that consume a multitude of internal and external services can be complicated and error-prone since there are multiple points of failure that can originate from services of libraries that you have no control over. In this course, Debugging and Error Handling in ASP.NET Core Web API, you’ll learn how to leverage error handling to control your application flow in your .NET Core Web APIs. First, you’ll explore how to use the built-in features of .NET Web API projects to convert errors from raw exceptions that might contain sensitive information into meaningful error codes and messages that can be displayed to consuming applications. Next, you’ll discover how to use error handling to control the flow of your application by converting errors into actionable events that can be taken rather than terminating the request. Finally, you'll learn how to create a custom error handling middleware that can parse known and unknown errors to handle any scenario and produce meaningful error codes. When you’re finished with this course, you’ll have the skills and knowledge error handling features of .NET needed to build resilient Web APIs.
Table of contents
- Overview 1m
- Documenting API Using Swagger 5m
- Extending Swagger UI Using XML Comments 5m
- Checkpoint 02 - Configure Swagger 0m
- Debugging API Using Swagger 7m
- Debugging API Using Postman 5m
- Checkpoint 03 - Debug Using Swagger UI 0m
- Working with Collections in Postman 8m
- Debugging Webhook Endpoints Locally 7m
- Summary 1m
- Overview 1m
- Setting up Multiple API Environments 4m
- Creating Custom Error Handler Pages 7m
- Checkpoint 04 - Error Handler Page 0m
- Modifying API Responses Using Filters 8m
- Mapping Error Codes to Instruction Links 4m
- Checkpoint 05 - Error Filter 0m
- Customizing Default Error Details 6m
- Summary 1m
- Checkpoint 06 - Client Error Mapping 0m
- Overview 1m
- Global Error Handling Using the Built-in Exception Middleware 5m
- Working with Custom Exceptions 8m
- Checkpoint 07 - Built-in Error Handling Middleware 0m
- Logging Errors Globally 6m
- Creating a Custom Error Handling Middleware 6m
- Summary 1m
- Checkpoint 08 - Custom Error Handling Middleware 0m