Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
In the previous article, I wrote about API versioning and how to add Swagger to the sample project with support of API versioning. In this article, I show how to add custom middleware to handle exceptions globally and create a custom response when an error occurred.
If you wrap the result into another object like IdentityResult, you should pay the extra heap allocation. For each call, an extra object should be initialized even for the successful operation. If you call an API 100 times with different inputs, how many times an exception may be thrown? So the rate of throwing an exception with the extra object initializing (and heap allocation) is not the same
Related posts
- Ask HN: Helpdesk/ticketing software for small SaaS company
-
OPA (Open Policy Agent) VS topaz - a user suggested alternative
2 projects | 25 Jul 2023
- Best social login library for PHP ("sign in with Apple/Google/Facebook" etc.)?
- Best social login library for PHP ("sign in with Apple/Google/Facebook" etc.)?
- How to implement SAML in dotnet core?