mirror of
https://github.com/encode/django-rest-framework.git
synced 2026-02-18 05:00:33 +03:00
Merge 89020ae924 into f38354943c
This commit is contained in:
commit
713514bb7f
|
|
@ -112,6 +112,7 @@ class APIException(Exception):
|
|||
code = self.default_code
|
||||
|
||||
self.detail = _get_error_details(detail, code)
|
||||
super().__init__(self.detail)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.detail)
|
||||
|
|
@ -159,6 +160,7 @@ class ValidationError(APIException):
|
|||
detail = [detail]
|
||||
|
||||
self.detail = _get_error_details(detail, code)
|
||||
super().__init__(self.detail, code)
|
||||
|
||||
|
||||
class ParseError(APIException):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user