We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Conflict
1 parent 04738fa commit 6cfad80Copy full SHA for 6cfad80
rest_framework_json_api/exceptions.py
@@ -1,6 +1,9 @@
1
-
2
-from django.utils import six, encoding
+from django.utils import encoding
+from django.utils.translation import ugettext_lazy as _
3
+from rest_framework import status
4
+from rest_framework.exceptions import APIException
5
from rest_framework.views import exception_handler as drf_exception_handler
6
+
7
from rest_framework_json_api.utils import format_value
8
9
@@ -39,3 +42,8 @@ def exception_handler(exc, context):
39
42
context['view'].resource_name = 'errors'
40
43
response.data = errors
41
44
return response
45
46
47
+class Conflict(APIException):
48
+ status_code = status.HTTP_409_CONFLICT
49
+ default_detail = _('Conflict.')
0 commit comments