Ensure proper Exception inheritance in APIException subclasses

This commit is contained in:
RinZ27 2026-02-05 10:27:45 +07:00
parent b5455c5daf
commit 89020ae924
No known key found for this signature in database

View File

@ -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):