Add information and exceptions.py to encourage custom exception handlers

This commit is contained in:
Saqibur Rahman 2023-11-25 23:52:44 +06:00
parent f21a838488
commit 59fc1071d9
2 changed files with 13 additions and 0 deletions

View File

@ -135,6 +135,13 @@ Currently we're proposing that major changes to the following, constitutes a new
1. Major optimizations
1. Major code reorganization and code refactor
### Exception handling
You should probably add a custom exception handler to your project based on
who consumes your APIs. To learn how to create a custom exception handler,
you can check out the Django Rest Framework documentation at:
https://www.django-rest-framework.org/api-guide/exceptions/#custom-exception-handling
### `config`
* Contains project configuration files, including the primary URL file
* ~~Contains settings split into `base`, `local`, `production` and `development`.~~. Update: As environment

6
apps/core/exceptions.py Normal file
View File

@ -0,0 +1,6 @@
"""
You should probably add a custom exception handler to your project based on
who consumes your APIs. To learn how to create a custom exception handler,
you can check out the Django Rest Framework documentation at:
https://www.django-rest-framework.org/api-guide/exceptions/#custom-exception-handling
"""