.NET 6 - Web API Global Exceptions Handling 🌐 ❌

preview_player
Показать описание
In this video we will be going to be 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.

Support me on Patreon to access the source code:

00:00 Intro
02:17 Creating the App
03:47 Installing Nuget Packages
07:26 Creating the Models
08:40 Creating the Application DbContext
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:08:58 Testing our code

Create .NET 6 Web API

Middlewares

Dependency Injections

Let us connect:

Support my work:

Hire Me:

WHO AM I:
I'm Mohamad, a Enterprise Architect working in Manchester, UK. I make videos about web, cloud, desktop and mobile development.

#WebAPI #error #dotnet
Рекомендации по теме
Комментарии
Автор

My WebApi journey is very good with your videos Mohamad. Thanks for your contents. I am very glad to found you.

Ertan_Taner
Автор

Thank you for sharing the content. these are real world codes that can be used in daily work. Not just a simple basic stuff.

DarshanaHashendra
Автор

Very complete video, love it! Thank you!

nirvrox
Автор

Thanks for the great vidoes. Please make a video on IdentityServer using database

osahonighodaro
Автор

this is awesome!can you make a video about services vs repositories what are the difference between those two?

kimrobertrozen
Автор

Hello, it is recommanded to use ProblemDetail as result object, the standardized way to handle global errors

mahmoudbouchefa
Автор

Great content moe, but can you please place the mic a little bit farther away, it is picking up all the noises.

Again, great content. Keep it coming

HilalYazbeck
Автор

Is there a way to have one exception class and to not bloat our app with if blocks?

emirsalihovic
Автор

Good one. But how we can populate this error show in UI side or it is stored any result text file ? can you explain more

jayakumar
Автор

Imput data validation error is not catched here. Any sugestions how to add that to?

markohorvat
Автор

What is this terminal tool that U using ? :D Please ? That I have colorfull fonts and icons ?

medzik
Автор

You look at the comnt and is like "that's a relatable comnt" you look at the replies and lost hope in humanity

m.a.touhidislam
Автор

It would be nice if you handle in a proper way System.AggregateException also.

ybckcfm