Skip to content

Commit bd6be01

Browse files
committed
safer refresh
1 parent f81acae commit bd6be01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometrix/connect/aws_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _request_with_refresh(self, *, method, url, data=None, params=None, headers=
125125
verify=verify,
126126
headers=headers,
127127
)
128-
if resp is not None and resp.status_code == 403:
128+
if resp is not None and resp.status_code in (400, 401, 403):
129129
self._refresh_credentials()
130130
resp = self.signed_request(
131131
method=method,

0 commit comments

Comments
 (0)