.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

Why Laravel is the Best PHP Framework? List of Laravel Admin Templates

Simple Web Scraping with Python’s Selenium

Using Rust for Scientific Numerical applications: Learning from Past Experiences

Convert Adobe Flash to HTML5 and make your Web Application Future Proof | Zealous System

VIPER Project Template in Xcode 9: When module template is not enough…


Top Current Programming Languages for Game Development

Twilio ($TWLO) Posturing For Major Rally

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

NET5 Exception Handling Made Easy

Multiple Request/Response examples for Swagger UI in ASP.NET core

Implementing Unit Of Work And Repository Pattern With Dependency Injection In .Net 5

Writing Cleaner and More Functional APIs in .Net 6