8000 Added Twilio error code to TwilioRestException · ryanhorn/twilio-python@6c93c7c · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c93c7c

Browse files
committed
Added Twilio error code to TwilioRestException
1 parent 6e59c4b commit 6c93c7c

File tree

1 fi CE1A le changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

twilio/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ class TwilioException(Exception):
88

99
class TwilioRestException(TwilioException):
1010

11-
def __init__(self, status, uri, msg=""):
11+
def __init__(self, status, uri, msg="", code=None):
1212
self.uri = uri
1313
self.status = status
1414
self.msg = msg
15+
self.code = code
1516

1617
def __str__(self):
1718
return "HTTP ERROR %s: %s \n %s" % (self.status, self.msg, self.uri)

0 commit comments

Comments
 (0)
0