diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 09f111102e..052ed46b8e 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -112,6 +112,7 @@ def __init__(self, detail=None, code=None): 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 @@ def __init__(self, detail=None, code=None): detail = [detail] self.detail = _get_error_details(detail, code) + super().__init__(self.detail, code) class ParseError(APIException):