No video

Global Exception Handling in Asp.Net Core Web API using IExceptionHandler

  Рет қаралды 13,538

Nitish Kaushik

Nitish Kaushik

7 ай бұрын

Global Exception Handling in Asp.Net Core Web API can be done using IExceptionHandler. The IExceptionHandler interface in asp.net core is a newly added concept and it is used to avoid try-catch from your asp.net core application by handling the exceptions globally.
The IExceptionHandler interface in dotnet core can be used to handle the exceptions globally in all the asp.net core frameworks like asp.net core web api, minimal apis, blazor, asp.net core mvc etc.
#exceptionhandling #iexceptionhandling #aspnetcore
Join this channel to get access to the perks:
/ @nitish.kaushik

Пікірлер: 25
@kaushikbhadani
@kaushikbhadani 7 ай бұрын
Thank you Nitish Kaushik! Your tutorial is very very nice. waiting for your new series...
@TeemoPwnstar
@TeemoPwnstar 3 ай бұрын
Excellent video - thank you Nitish
@nitish.kaushik
@nitish.kaushik 3 ай бұрын
Glad you liked it!
@egitim10
@egitim10 5 ай бұрын
Very clear. Thanks Nitish
@NaveenKumar-dc8jv
@NaveenKumar-dc8jv 4 ай бұрын
Simple and good. :)
@GurdeepSingh-cg1yp
@GurdeepSingh-cg1yp 20 күн бұрын
The use of "if not" in the exception handlers is not a good idea as that would mean you will need to add a new check to all your handlers every time you add a new exception handler.
@aamirkhan3657
@aamirkhan3657 5 ай бұрын
how can i get the error message with status code from exception middleware and get it in api controller and send that in response to the user
@adarsharooradarsharoor5305
@adarsharooradarsharoor5305 2 ай бұрын
How can we include it in the DLL's because all the business logics usually we write it inside the separate DLL's.
@achalprajapati1192
@achalprajapati1192 24 күн бұрын
if we are use Authorize attribute then How to handle Authorize exception handling?
@KnowlegeStream
@KnowlegeStream 2 ай бұрын
How to register Exception handler with logger in Program.cs?
@vyshakhkm
@vyshakhkm 5 ай бұрын
How can use this exception handler in POST request
@sachinrajput4746
@sachinrajput4746 7 ай бұрын
Thanks sir
@farapar3783
@farapar3783 7 ай бұрын
if my app can not to connect to db then how this handler can help because in my code i cant throw excetion
@nitish.kaushik
@nitish.kaushik 6 ай бұрын
You don't have to throw the exception explicitly. I was throwing them just for the demo. Otherwise this Handler will catch all the exceptions.
@UnbiasedThamizhan
@UnbiasedThamizhan 2 ай бұрын
Your intention is right, but not clear; You have to stop and show the difference between two handlers.
@oveskhan687
@oveskhan687 5 ай бұрын
can you show how to use this handler in console app
@nitish.kaushik
@nitish.kaushik 3 ай бұрын
This is for Asp.Net core only
@oveskhan687
@oveskhan687 3 ай бұрын
@@nitish.kaushik yes .net core console app. How to implement it on console app.
@nitish.kaushik
@nitish.kaushik 3 ай бұрын
Asp. Net core is for web applications. Asp. Net core is a sub framework of dotnet core ecosystem and asp.net core is diff from console
@v4raziel
@v4raziel 13 күн бұрын
Bad Approach for handling multiple exceptions types.. app.
HttpClient in Asp.Net Core Web API | HttpClient C#
27:33
Nitish Kaushik
Рет қаралды 4,8 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 12 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 11 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 14 МЛН
Don't throw exceptions in C#. Do this instead
18:13
Nick Chapsas
Рет қаралды 256 М.
Should I Create A Minimal API Or Full API?
7:40
IAmTimCorey
Рет қаралды 35 М.
Getting Started with Dapper in .NET
11:29
Amichai Mantinband
Рет қаралды 10 М.
The Best Way To Organize Your Program.cs In ASP.NET
6:59
Amichai Mantinband
Рет қаралды 15 М.
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 58 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 12 МЛН