Skip to content

Commit ebbb279

Browse files
committed
improve error handling for 503 status in SharePoint service
1 parent 27db2ef commit ebbb279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/office365_service/sharepoint_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run_operation():
6868
else:
6969
print("Falha ao relogar. Abortando.")
7070
raise e
71-
elif e.response.status_code == 503:
71+
elif e.response.status_code == 503 or "503" in str(e):
7272
print(
7373
f"Erro 503 (Serviço Indisponível). Tentativa {attempt + 1}/{max_retries} em {delay_seconds}s...")
7474
time.sleep(delay_seconds)

0 commit comments

Comments
 (0)