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

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 31

  • @kaushikbhadani
    @kaushikbhadani 10 місяців тому +2

    Thank you Nitish Kaushik! Your tutorial is very very nice. waiting for your new series...

  • @egitim10
    @egitim10 8 місяців тому +1

    Very clear. Thanks Nitish

  • @coding-gemini
    @coding-gemini 2 місяці тому

    This is good stuff bro, thanks. What if we want to continue processing other code and not return back the exception to the controller just logging it, how do we do that.

  • @GurdeepSingh-cg1yp
    @GurdeepSingh-cg1yp 3 місяці тому +3

    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.

  • @TeemoPwnstar
    @TeemoPwnstar 6 місяців тому +1

    Excellent video - thank you Nitish

  • @aamirkhan3657
    @aamirkhan3657 8 місяців тому +1

    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

  • @venkatrao100
    @venkatrao100 20 днів тому

    How to close db connections if exception raised in this approach? Generally i can close db connection in finally block...

  • @vyshakhkm
    @vyshakhkm 9 місяців тому

    How can use this exception handler in POST request

  • @adarsharooradarsharoor5305
    @adarsharooradarsharoor5305 6 місяців тому

    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 4 місяці тому

    if we are use Authorize attribute then How to handle Authorize exception handling?

  • @KnowlegeStream
    @KnowlegeStream 6 місяців тому

    How to register Exception handler with logger in Program.cs?

  • @geragamo
    @geragamo Місяць тому

    nice

  • @NaveenKumar-dc8jv
    @NaveenKumar-dc8jv 7 місяців тому +1

    Simple and good. :)

  • @sachinrajput4746
    @sachinrajput4746 10 місяців тому

    Thanks sir

  • @omarabdelrahim8949
    @omarabdelrahim8949 Місяць тому

    I need a full course with real project multi language supporting with generate report and sending real time notification.

  • @farapar3783
    @farapar3783 10 місяців тому

    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  10 місяців тому +2

      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.

  • @oveskhan687
    @oveskhan687 8 місяців тому

    can you show how to use this handler in console app

    • @nitish.kaushik
      @nitish.kaushik  7 місяців тому +1

      This is for Asp.Net core only

    • @oveskhan687
      @oveskhan687 7 місяців тому

      @@nitish.kaushik yes .net core console app. How to implement it on console app.

    • @nitish.kaushik
      @nitish.kaushik  7 місяців тому +1

      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

  • @UnbiasedThamizhan
    @UnbiasedThamizhan 5 місяців тому +2

    Your intention is right, but not clear; You have to stop and show the difference between two handlers.

  • @v4raziel
    @v4raziel 3 місяці тому

    Bad Approach for handling multiple exceptions types.. app.

    • @krccmsitp2884
      @krccmsitp2884 2 місяці тому

      You can handle multiple or even all exception types in one single exception handler.