Skip to content

Commit 89020ae

Browse files
committed
Ensure proper Exception inheritance in APIException subclasses
1 parent b5455c5 commit 89020ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rest_framework/exceptions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def __init__(self, detail=None, code=None):
112112
code = self.default_code
113113

114114
self.detail = _get_error_details(detail, code)
115+
super().__init__(self.detail)
115116

116117
def __str__(self):
117118
return str(self.detail)
@@ -159,6 +160,7 @@ def __init__(self, detail=None, code=None):
159160
detail = [detail]
160161

161162
self.detail = _get_error_details(detail, code)
163+
super().__init__(self.detail, code)
162164

163165

164166
class ParseError(APIException):

0 commit comments

Comments
 (0)