mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-17 19:52:25 +03:00
Update exceptions.py
This commit is contained in:
parent
a45432b54d
commit
96229795dd
|
@ -141,7 +141,7 @@ class APIException(Exception):
|
||||||
# raise serializers.ValidationError('Value was invalid')
|
# raise serializers.ValidationError('Value was invalid')
|
||||||
|
|
||||||
class ValidationError(APIException):
|
class ValidationError(APIException):
|
||||||
status_code = status.HTTP_400_BAD_REQUEST
|
status_code = status.HTTP_422_UNPROCESSABLE_ENTITY
|
||||||
default_detail = _('Invalid input.')
|
default_detail = _('Invalid input.')
|
||||||
default_code = 'invalid'
|
default_code = 'invalid'
|
||||||
default_params = {}
|
default_params = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user