Commit 115fe048 by Carlton Gibson

Merge pull request #1501 from jacobg/patch-1

add a __str__ implementation to APIException
parents 591cf8a4 6322feb3
...@@ -20,6 +20,8 @@ class APIException(Exception): ...@@ -20,6 +20,8 @@ class APIException(Exception):
def __init__(self, detail=None): def __init__(self, detail=None):
self.detail = detail or self.default_detail self.detail = detail or self.default_detail
def __str__(self):
return self.detail
class ParseError(APIException): class ParseError(APIException):
status_code = status.HTTP_400_BAD_REQUEST status_code = status.HTTP_400_BAD_REQUEST
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment