Skip to main content

django-rest-custom-exceptions

Custom exceptions for django rest framework

Compatibility

Works with :

  • Python 2.7, 3.4, 3.5, 3.6

  • Django >= 1.10

  • Django Rest Framework >= 3.5

https://travis-ci.org/unistra/django-rest-framework-custom-exceptions.svg?branch=master https://coveralls.io/repos/github/unistra/django-rest-framework-custom-exceptions/badge.svg?branch=master Code Health

Installation

Install the package from pypi:

pip install djangorestframework-custom-exceptions

Add the application in your django settings:

INSTALLED_APPS = ('rest_framework_custom_exceptions',)

Configure your rest framework :

REST_FRAMEWORK = {
    'EXCEPTION_HANDLER': 'rest_framework_custom_exceptions.exceptions.simple_error_handler'
}

Example

The simple error handler show exceptions like this :

{
    "error": "Not found"
}

Release files for djangorestframework-custom-exceptions 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangorestframework-custom-exceptions 1.0.2
File Size Uploaded
djangorestframework-custom-exceptions-1.0.2.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djangorestframework-custom-exceptions 1.0.2
File Interpreter ABI Platform
djangorestframework_custom_exceptions-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / djangorestframework-custom-exceptions-1.0.2.tar.gz

Download URL djangorestframework-custom-exceptions-1.0.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c10bb46e65803614dc7b90b1a7a5c2c6abec200711a9d19f4172e66b92839bc
BLAKE2b-256 checksum
How to use checksums
b25b0d5c4ce71e94e9c9fc6ce70c3bb8e88ce4f65ce83a5c7146ece3bf01b27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

Release files / djangorestframework_custom_exceptions-1.0.2-py3-none-any.whl

Download URL djangorestframework_custom_exceptions-1.0.2-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
823116f8eb6605b1abab3e01289088d7669e3170ba397b1091534c19babfb64d
BLAKE2b-256 checksum
How to use checksums
878a5cde96396379bb4c0dd659df5acba004b2efbe8dfd7b95a2f81681c077e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page