Global exception handling is a critical part of any web application, allowing you to handle exceptions centrally and provide a consistent user experience. In this video, we'll show you how to implement global exception handling in ASP.NET Core Web APIs with .NET 6, using a custom middleware approach.

discussion Global Error Handling in .NET 6 Application why do we need it and how can we implement it in our  .NET 6 Web API.

00:00 Intro
02:17 Creating the App
03:47 Installing Nuget Packages
07:26 Creating the Models
08:40 Creating the Application DbContext
12:46 Updating the Program.cs
14:42 Db Migration
16:39 Creating the services
27:49 Creating the Controller
35:49 Creating the Exceptions 
40:23 Creating the Global Exception Handler Middleware
01:05:00 Creating the Middleware Builder Extension
01:07:49 Updating the Program.cs
01:08:58 Testing our code

 Github - https://github.com/mohamadlawand087

#webapi  #error  #dotnet 

Master Global Exception Handling in .NET 6 ASP.NET Core Web APIs
1.15 GEEK