The New Global Error Handling in ASP.NET Core 8

Published: 08 December 2023
on channel: Milan Jovanović
41,254
1k

Get the source code for this video for FREE → https://the-dotnet-weekly.ck.page/glo...
☄️ 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:   / milanjovanovic  

Error handling is critical for .NET APIs. I will split this video into two parts: errors I know how to handle and errors I don't know how to handle. For errors I know how to handle, I like using the Result pattern. It helps me get rid of exceptions and make my intent explicit. For errors I don't know how to handle, I'll use exceptions. To handle exceptions, I can create a global exception handler. This can be done using middleware or to hew IExceptionHandler in .NET 8.

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Read my Blog here:
https://www.milanjovanovic.tech/blog

Global Error Handling in ASP.NET Core 8
https://www.milanjovanovic.tech/blog/...

3 Ways To Create Middleware In ASP .NET Core
https://www.milanjovanovic.tech/blog/...

Chapters
0:00 Errors that you know how to handle
2:02 Problem Details standard error response
5:32 Handling exceptions with Middleware
9:29 Handling exceptions with IExceptionHandler


Watch video The New Global Error Handling in ASP.NET Core 8 online, duration hours minute second in high quality that is uploaded to the channel Milan Jovanović 08 December 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 41,254 times and liked it 1 thousand visitors.