Skip to content

Commit

Permalink
fix(offline-scans): If HTTP status is 'unauthorized' always try to re…
Browse files Browse the repository at this point in the history
…fresh token and try again one more time
  • Loading branch information
itamarga committed Aug 8, 2024
1 parent d14bd3b commit 9cc3dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion intezer_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def request_with_refresh_expired_access_token(self,
self._refresh_token_if_needed()
response = self._request(method, path, data, headers, files, stream, base_url, timeout_in_seconds)

if response.status_code == HTTPStatus.UNAUTHORIZED and not self._token_expiration:
if response.status_code == HTTPStatus.UNAUTHORIZED:
self._set_access_token()
response = self._request(method, path, data, headers, files, stream, base_url, timeout_in_seconds)

Expand Down

0 comments on commit 9cc3dca

Please sign in to comment.