4 ms·
> Handle them centrally, e.g. in middleware for a web application. So, for a Django app is it better to use their built-in middleware framework or something th
by duckmysick 3y ago
> Handle them centrally, e.g. in middleware for a web application.
So, for a Django app is it better to use their built-in middleware framework or something third-party that sits outside of Django?
https://docs.djangoproject.com/en/4.2/topics/http/middleware/ https://docs.djangoproject.com/en/4.2/topics/http/middleware...
- robertlagrant 3y agoDepends on what you mean by "sits outside of". If an exception reaches the response code in a web application, it's going to be converted to an HTTP error code and sent. You want to be thinking about what you want your API (or website) to expose to the user and work back from there.