Skip to content

Commit 48169f8

Browse files
committed
catch HTTPUnauthorized instead of TokenExpiredError. Might need to parse error if this works
1 parent b2d00de commit 48169f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fitbit/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def make_request(self, url, data={}, method=None, **kwargs):
6868
try:
6969
auth = OAuth2(client_id=self.client_id, token=self.token)
7070
response = self._request(method, url, data=data, auth=auth, **kwargs)
71-
except TokenExpiredError as e:
71+
except HTTPUnauthorized as e:
7272
self.refresh_token()
7373
auth = OAuth2(client_id=self.client_id, token=self.token)
7474
response = self._request(method, url, data=data, auth=auth, **kwargs)

0 commit comments

Comments
 (0)