Skip to content

Commit a4777b3

Browse files
committed
bump version to 0.1.7 and improve error handling for 429 status in SharePoint service
1 parent 28b5fb3 commit a4777b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "office365-service"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
description = "Add your description here"
55
readme = "README.md"
66
authors = [

src/office365_service/sharepoint_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def wrapper(self, *args, **kwargs):
2727
last_exception = e
2828
if e.response.status_code == 429:
2929
print(f"Erro 429 (Muitas solicitações) detectado. Aguardando 60 segundos...")
30-
time.sleep(60)
30+
time.sleep(60 * (attempt+1))
3131
continue
3232
elif e.response.status_code == 403:
3333
print("Erro 403 (Proibido) detectado. Tentando relogar...")

0 commit comments

Comments
 (0)