Global Exception Handling in ASP.NET Core Web API (.NET 8)

preview_player
Показать описание

In this video, we are going to see three different ways that we can use to handle our exceptions globally in the ASP.NET Core application. I will show you how to use the built-in exception middleware and the custom-created middleware, and finally, we will use a new .NET 8 interface called IExceptionHandler.
I’ll also show you how to customize error responses that you can send back to your clients.

LINKS MENTIONED IN THE VIDEO

FOLLOW US ON SOCIAL MEDIA!
Рекомендации по теме
Комментарии
Автор

Thank you all for watching and for your support.

CodeMaze
Автор

This is one of the best channels rigth now, all the topics are super usefulls

andresbeltran
Автор

I noticed this in the new version of your book, it's a much cleaner way of centralising exception handling. Sometimes it's much better to hear the voice explaining what we are doing rather than just reading the book. Thank you for this video.

parko
Автор

I have a question, I vaguely remember seeing elsewhere that this new way of handling exceptions in .net 8 forced us to create a class per exception. I am not referring to exceptions that one wants to create, but to the middleware. I see that it can be handled in the same way as in previous versions, a single class with all the exceptions logic of the project and it returns true and that's it, does it work like that? Another thing that I am not very clear about is why it would return false? Maybe if I wanted to invoke another process in another class? greetings

andresbeltran
Автор

Can you provide the code for Logger Service Library which you have implemented

BobbyRock
Автор

Nice tutorial, is possible get code example ?

Totti
Автор

please send the repository link for checking code

mrityunjaik
Автор

different ways of exception handling:
- Try-Catch Block
- Built-In Middleware
- Custom Middleware
- IExceptionHandler (.NET 8)

did i understand correctly?

orange_cat_energy
Автор

Thank you for your video but it in .net 8 it has been simplified.

JohnSmith-yrih