Skip to content

Commit 268b8f9

Browse files
author
Greg Taylor
committed
Include error codes in the __str__ of exceptions.
1 parent 1285bbc commit 268b8f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fedex/base_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, error_code, value):
1919
self.error_code = error_code
2020
self.value = value
2121
def __str__(self):
22-
return repr(self.value)
22+
return "%s (Error code: %s)" % (repr(self.value), self.error_code)
2323

2424
class FedexFailure(FedexBaseServiceException):
2525
"""

0 commit comments

Comments
 (0)