Verbose Errors
A simple package for DRF errors formatting
Requirements
- Python 3.6.8 or newer
- Django 3.2.19 or newer
- Django Rest Framework 3.14.0 or newer
Formatting
This package provides the exception handler that formats handled DRF exceptions into verbose error response
Generic error
{
"errors": [
{
"field": null,
"messages": [
"You do not have enough permissions to perform this action"
]
}
]
}
Error related to an object field
{
"errors": [
{
"field": "name",
"messages": [
"This field is required",
"This field can not be null"
]
}
]
}
Setting up
Install this package using pip
pip install djangorestframework-verbose-errors
Register the exception handler
REST_FRAMEWORK = {
'EXCEPTION_HANDLER': 'rest_framework_verbose_errors.views.exception_handler'
}
License
Metadata
Release files for djangorestframework-verbose-errors 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djangorestframework-verbose-errors-0.0.5.tar.gz | 1.9 kB | Without provenance | Details for djangorestframework-verbose-errors-0.0.5.tar.gz |
Release files / djangorestframework-verbose-errors-0.0.5.tar.gz
| Download URL | djangorestframework-verbose-errors-0.0.5.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efb85c1b97c23f4c289841ba8cfe16aed009df9097b4898d1b811b5c685e5bfb
|
|
BLAKE2b-256 checksum How to use checksums |
6bf11362c6b8eec11d6723aaa55d9374ae9bc0066de704e12cf9b81c38c2662d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.15 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
|
Security for djangorestframework-verbose-errors 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.