You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We preferably need to return errors in one single coherent format :
We should not return error messages in a different structure for api/ (our custom routes) than it is being returned in auth/ (djoser), so we either reproduce the same structure as how djoser handles errors, or we override djoser's)
The drf-standardized-errors package provides an exception handler that generates the same format for all 4xx and 5xx responses. It is a drop-in replacement for the default exception handler and allows customizing the error response format without rewriting the whole exception handler. The standardized error response format is easier to document and easier to handle by API consumers.
Blocking #219 & #220
We preferably need to return errors in one single coherent format :
We should not return error messages in a different structure for api/ (our custom routes) than it is being returned in auth/ (djoser), so we either reproduce the same structure as how djoser handles errors, or we override djoser's)
https://www.django-rest-framework.org/api-guide/exceptions/#custom-exception-handling
Integration with drf-spectacular
https://drf-standardized-errors.readthedocs.io/en/latest/openapi.html
The text was updated successfully, but these errors were encountered: