Skip to content

Commit e1d7f71

Browse files
samikshya-dbvarun-edachali-dbx
authored andcommitted
Improve debugging + fix PR review template (#514)
* Improve debugging + add PR review template * case sensitivity of PR template Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent b54b04a commit e1d7f71

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/databricks/sql/auth/retry.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,8 @@ def should_retry(self, method: str, status_code: int) -> Tuple[bool, str]:
408408
and status_code not in self.status_forcelist
409409
and status_code not in self.force_dangerous_codes
410410
):
411-
return (
412-
False,
413-
"ExecuteStatement command can only be retried for codes 429 and 503",
411+
raise UnsafeToRetryError(
412+
"ExecuteStatement command can only be retried for codes 429 and 503. Received code: {status_code}"
414413
)
415414

416415
# Request failed with a dangerous code, was an ExecuteStatement, but user forced retries for this

0 commit comments

Comments
 (0)