Troubleshooting and Debugging

No software product is perfect, and the harsh truth is that no matter how much effort you put into designing and testing your code, there is always a very good chance that you missed some edge case that will cause your application to fail. If you can't win the game, you need to change the rules. Instead, make sure that, even if your application fails with an error, it will know how to recover and give you as much information as it can so that you can reproduce the scenario and solve the problem.

In this chapter, you will learn how you can protect your API from unhandled exceptions, and how you can return meaningful error responses to your API client that will later allow you to decipher what the problem was

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.