Skip to content

Commit ca61970

Browse files
committed
feat: Retry on HTTP 400 / "failedPrecondition"
Extracts out a function to decode the contents.
1 parent cb5b5c2 commit ca61970

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

googleapiclient/http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import time
3535
import urllib
3636
import uuid
37+
from typing import Optional
3738

3839
import httplib2
3940

@@ -77,7 +78,7 @@
7778
_LEGACY_BATCH_URI = "https://www.googleapis.com/batch"
7879

7980

80-
def _decode_reason_from_content(content) -> str | None:
81+
def _decode_reason_from_content(content) -> Optional[str]:
8182
reason = None
8283

8384
if not content:

0 commit comments

Comments
 (0)