Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 5d26f90

Browse files
committed
Make _check_unavailable always pass for INTERNAL errors
1 parent 42322ad commit 5d26f90

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

google/cloud/spanner_v1/_helpers.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,9 @@ def _check_rst_stream_error(exc):
588588

589589

590590
def _check_unavailable(exc):
591-
resumable_error = (
592-
any(
593-
resumable_message in exc.message
594-
for resumable_message in ("Service unavailable",)
595-
),
596-
)
597-
if not resumable_error:
598-
raise
591+
# For UNAVAILABLE, we don't need to check against the
592+
# messages as these should just be noop and retryable always.
593+
return
599594

600595

601596
def _metadata_with_leader_aware_routing(value, **kw):

0 commit comments

Comments
 (0)