2 Best Practices for Returning API Errors in ASP.NET Core
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic How do you approach API errors? I want to share 2 best practices with you in this video. The first is using the correct status code for the failure. The second is returning a Problem Details describing what went wrong. Standardizing your API error response helps the clients handle failure responses easily. Check out my courses: https://bit.ly/3PupkOJ The .NET Weekly newsletter: https://www.milanjovanovic.tech Read my Blog here: https://www.milanjovanovic.tech/blog Functional Error Handling in .NET With the Result Pattern https://www.milanjovanovic.tech/blog/functional-error-handling-in-dotnet-with-the-result-pattern Global Error Handling in ASP.NET Core 8 https://www.milanjovanovic.tech/blog/global-error-handling-in-aspnetcore-8 Chapters 0:00 Using the Result pattern to return Problem Details 2:59 Using ErrorTypes to return the correct Status Code 7:01 Returning a Problem Details based on the Error
Download
0 formatsNo download links available.