.NET Core API -Exception Handling

Photo by Karlis Reimanis on Unsplash

When building an API, having exception handling is a must for the consistency of the application. We obviously don’t want any weird behavior unhandled.

It gets more tricky when we have a custom exception that is handled on a case-specific basis. i.e: Entity validation, not found resource, etc.

that's where having an exception middleware to handle exception types can be helpful.




Software developer | Programming and Blockchain enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

No Code Salesforce Integration with Cognism

Microservices Data Design Patterns

Adventures in Coding: Getting Set Up

However, Harbaugh’s window of opportunity to build Michigan Football

Building A Simple Telegram Bot With AWS Lambda

Spinning up a BitClout node just got a hell of a lot more lucrative.

Go: Concurrency vs Parallelism

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ibrahim Jaber

Ibrahim Jaber

Software developer | Programming and Blockchain enthusiast

More from Medium

Testing file upload with Swagger in ASP.Net core

Why is SOLID gold standard in .NET?

NET5 Exception Handling Made Easy

Write a URL Shortener in 26 Lines of Code with .NET Minimal APIs