mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-22 22:42:57 +03:00
Merge pull request #1501 from jacobg/patch-1
add a __str__ implementation to APIException
This commit is contained in:
commit
115fe04842
|
@ -20,6 +20,8 @@ class APIException(Exception):
|
|||
def __init__(self, detail=None):
|
||||
self.detail = detail or self.default_detail
|
||||
|
||||
def __str__(self):
|
||||
return self.detail
|
||||
|
||||
class ParseError(APIException):
|
||||
status_code = status.HTTP_400_BAD_REQUEST
|
||||
|
|
Loading…
Reference in New Issue
Block a user