Skip to content

Commit 9c6452f

Browse files
Resolved status code error
1 parent 2c00047 commit 9c6452f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

track/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def fatal_exception(exc):
6969
# retry on server errors and client errors
7070
# with 429 status code (rate limited),
7171
# don't retry on other client errors
72-
return (400 <= exc.status < 500) and exc.status != 429
72+
return (400 <= exc.status_code < 500) and exc.status_code != 429
7373
else:
7474
# retry on all other errors (eg. network)
7575
return False

track/request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def post(write_key, host=None, path=None, body=None, timeout=10):
3737

3838
class APIError(Exception):
3939

40-
def __init__(self, status, code, message):
40+
def __init__(self, status, status_code, message):
4141
self.message = message
4242
self.status = status
43-
self.code = code
43+
self.status_code = status_code
4444

4545
def __str__(self):
4646
msg = "[interakt-track] StatusCode({0}): {1} (Success={2})"
47-
return msg.format(self.code, self.message, self.status)
47+
return msg.format(self.status_code, self.message, self.status)

track/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.0.0'
1+
VERSION = '1.0.1'

0 commit comments

Comments
 (0)