API Error Handling with Result Pattern in C# .NET

3 months ago
4

Instead of throwing custom exceptions and handle those globally, let's try an alternative approach that return success or failure results explicitly for our C# .NET APIs.

Find the code: https://www.patreon.com/posts/api-error-with-c-96007416
More code: https://www.kiss-code.com/products

00:00 Intro
00:44 Why to pick which?
02:00 Sources
02:30 Exception Handling Recap
04:30 Error Objects
11:52 Return Results
15:07 Handle Results
20:00 Result Extension
21:55 Final Thoughts
22:56 Outro

#exceptions #dotnet #csharp #webapi #serilog #logging #monitoring #api #webdevelopment #fullstack #fullstacksoftwareengineering #backend #docker #azure #containerization #devops #cloud #microsoft #entityframework #identityframework #mssqlserver #mssql #cleanarchitecture #authentication #api #development #local #web #authorization #jwt #bearer #cqrs #mediatr #webapi #cors #http #stateless #webscraping #workers #migration #modular #monolith #verticalslicearchitecture #minimalapi #ratelimit #origin #host #result #pattern

Loading comments...