Skip to content

Commit 292ead1

Browse files
add drf-standardized-errors to third party packages (#8487)
Co-authored-by: Tom Christie <[email protected]>
1 parent 5471f8a commit 292ead1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/api-guide/exceptions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,15 @@ Set as `handler400`:
260260

261261
handler400 = 'rest_framework.exceptions.bad_request'
262262

263+
# Third party packages
264+
265+
The following third-party packages are also available.
266+
267+
## DRF Standardized Errors
268+
269+
The [drf-standardized-errors][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.
270+
263271
[cite]: https://doughellmann.com/blog/2009/06/19/python-exception-handling-techniques/
264272
[authentication]: authentication.md
265273
[django-custom-error-views]: https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views
274+
[drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors

docs/community/third-party-packages.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque
149149
* [django-api-client][django-api-client] - DRF client that groups the Endpoint response, for use in CBVs and FBV as if you were working with Django's Native Models..
150150
* [fast-drf] - A model based library for making API development faster and easier.
151151
* [django-requestlogs] - Providing middleware and other helpers for audit logging for REST framework.
152+
* [drf-standardized-errors][drf-standardized-errors] - DRF exception handler to standardize error responses for all API endpoints.
152153

153154
[cite]: http://www.software-ecosystems.com/Software_Ecosystems/Ecosystems.html
154155
[cookiecutter]: https://github.com/jpadilla/cookiecutter-django-rest-framework
@@ -239,3 +240,4 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque
239240
[rest-framework-actions]: https://github.com/AlexisMunera98/rest-framework-actions
240241
[fast-drf]: https://github.com/iashraful/fast-drf
241242
[django-requestlogs]: https://github.com/Raekkeri/django-requestlogs
243+
[drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors

0 commit comments

Comments
 (0)