.NET 6 - Web API Global Exceptions Handling 🌐 ❌

Mohamad Lawand September 20, 2022
Video Thumbnail
Mohamad Lawand Logo

Mohamad Lawand

View Channel

About

Development and cloud adventures, covering different topics and technologies. Join me on this adventure. Let us connect: 🌍 My website - https://www.mohamadlawand.com/ Support my work: https://www.patreon.com/mohamadlawand https://www.buymeacoffee.com/mohamadlawand 🌍 My website - https://mohamadlawand.com 📸 Instagram - https://www.instagram.com/mohamadlawand087/ 🐦 Twitter - https://twitter.com/moe23 ♯ Github - https://github.com/mohamadlawand087 🎫 LinkedIn - https://www.linkedin.com/in/mlawand 💥 LinkTree - https://linktr.ee/mohamadlawand 🖥️ Discord - https://discord.gg/rMGY8Tst WHO AM I: I'm Mohamad, a technical architect working in Manchester, UK. I make videos about web, cloud, desktop and mobile development. GET IN TOUCH: If you’d like to talk, I’d love to hear from you. Tweeting @moe23 directly will be the quickest way to get a response, but if your question is very long, feel free to email me at [email protected].

Video Description

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: https://www.patreon.com/mohamadlawand 00:00 Intro 02:17 Creating the App 03:47 Installing Nuget Packages 07:26 Creating the Models 08:40 Creating the Application DbContext 12:46 Updating the Program.cs 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:07:49 Updating the Program.cs 01:08:58 Testing our code Create .NET 6 Web API https://youtu.be/wtFs4356xp4 Middlewares https://youtu.be/vMkTQgAL6w0 Dependency Injections https://youtu.be/ORAfsRukNc4 Let us connect: 🌍 My website - https://mohamadlawand.com 📸 Instagram - https://www.instagram.com/mohamadlawand087/ 🐦 Twitter - https://twitter.com/moe23 ♯ Github - https://github.com/mohamadlawand087 🎫 LinkedIn - https://www.linkedin.com/in/mlawand 💥 LinkTree - https://linktr.ee/mohamadlawand Gear I use (affiliate link): https://amzn.to/3EbT8Jw Support my work: https://www.patreon.com/mohamadlawand https://www.buymeacoffee.com/mohamadlawand Hire Me: https://transactions.sendowl.com/products/78999951/625477F1/view 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

You May Also Like

C# Developer's Essential Tools

AI-recommended products based on this video

Loading...
Lenovo IdeaPad Duet 3i 10.3" Touchscreen Intel Celeron N4020, 2-in-1 Laptop, Windows 11 Home S Mode + Includes 1-Year Microsoft 365 Personal - 82AT00KJCC

Lenovo IdeaPad Duet 3i 10.3" Touchscreen Intel Celeron N4020, 2-in-1 Laptop, Windows 11 Home S Mode + Includes 1-Year Microsoft 365 Personal - 82AT00KJCC

(125)
$255.88
FREE delivery Sun, Jun 22
Loading...
KINGRACK 4 Step Ladder, Sturdy Steel Step Stool with Tool Platform, Safe-Lock, Handrail, Anti-Slip Wide Pedals, Pass 800lbs Load Testing, Folding Portable Ladder for Multi-Purpose, Home Kitchen, Black Global Recycled Standard

KINGRACK 4 Step Ladder, Sturdy Steel Step Stool with Tool Platform, Safe-Lock, Handrail, Anti-Slip Wide Pedals, Pass 800lbs Load Testing, Folding Portable Ladder for Multi-Purpose, Home Kitchen, Black Global Recycled Standard

(1,607)
$113.99
50+ bought in past month
Loading...
rategis Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit - Turbo Speed & Precision Blades

rategis Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit - Turbo Speed & Precision Blades

(11)
$29.99
Prime
1K+ bought in past month
Loading...
rategis Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit - Turbo Speed & Precision Blades,Brilliant Black

rategis Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit - Turbo Speed & Precision Blades,Brilliant Black

(77)
$29.99$26.99
FREE delivery Sat, Nov 22 on your first order
Loading...
rategist Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit, Brilliant Black

rategist Cordless Electric Razor for Men: 3-in-1 Shaver for Beard/Nose/Sideburns - IPX7 Waterproof Travel Kit, Brilliant Black

(229)
$49.99
FREE delivery Tue, Jun 24
900+ bought in past month
Loading...
eXtremeRate ThumbsGear Interchangeable Thumbstick for Xbox Controller - Improve Comfort - Orange 3 Height Domed & Concave Grips Ergonomic Adjustable Joystick for Xbox Core, for Xbox One S/X/Elite

eXtremeRate ThumbsGear Interchangeable Thumbstick for Xbox Controller - Improve Comfort - Orange 3 Height Domed & Concave Grips Ergonomic Adjustable Joystick for Xbox Core, for Xbox One S/X/Elite

(680)
$19.99
FREE delivery Sun, Aug 24 on your first order
Loading...
eXtremeRate ThumbsGear Interchangeable Thumbstick for Xbox Controller - Improve Comfort - Chrome Gold 3 Height Domed & Concave Grips Ergonomic Adjustable Joystick for Xbox Core, for Xbox One S/X/Elite

eXtremeRate ThumbsGear Interchangeable Thumbstick for Xbox Controller - Improve Comfort - Chrome Gold 3 Height Domed & Concave Grips Ergonomic Adjustable Joystick for Xbox Core, for Xbox One S/X/Elite

(351)
$20.99
FREE delivery Sun, Aug 24 on your first order
Loading...
eXtremeRate EDGE Sticks Interchangeable Thumbsticks for Xbox Core Controller, Carmine Red Swappable Analog Stick Joystick for Xbox One S/X, Xbox Elite V1 Controller, for Nintendo Switch Pro Controller

eXtremeRate EDGE Sticks Interchangeable Thumbsticks for Xbox Core Controller, Carmine Red Swappable Analog Stick Joystick for Xbox One S/X, Xbox Elite V1 Controller, for Nintendo Switch Pro Controller

(23)
$23.99
FREE delivery Tue, Aug 26 on your first order
Loading...
eXtremeRate Metal Thumbsticks for Xbox Core Wireless Controller, Green Custom Concentric Circles Aluminum Alloy Analog Stick Joystick Buttons for Xbox One S/X/Elite, for Xbox Series X/S Controllers

eXtremeRate Metal Thumbsticks for Xbox Core Wireless Controller, Green Custom Concentric Circles Aluminum Alloy Analog Stick Joystick Buttons for Xbox One S/X/Elite, for Xbox Series X/S Controllers

(68)
$16.99
FREE delivery Sun, Aug 24 on your first order
Loading...
Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

(8)
$39.99
FREE delivery Tue, Nov 4
Loading...
Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

(40)
$39.99
FREE delivery Thu, Nov 13