Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# Icon must end with two \r
Icon

# IntelliJ Files
.idea

# Thumbnails
._*
Expand Down
5 changes: 3 additions & 2 deletions src/databricks/sql/auth/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ def should_retry(self, method: str, status_code: int) -> Tuple[bool, str]:
default, this means ExecuteStatement is only retried for codes 429 and 503.
This limit prevents automatically retrying non-idempotent commands that could
be destructive.
5. The request received a 401 response, because this can never succeed.
6. The request received a 403 response, because this can never succeed.
5. The request received a 403 response, because this can never succeed.
6. The request received a 401 response, because the User credentials are invalid


Q: What about OSErrors and Redirects?
Expand All @@ -342,6 +342,7 @@ def should_retry(self, method: str, status_code: int) -> Tuple[bool, str]:
if status_code == 200:
return False, "200 codes are not retried"

# Invalid Credentials error. Don't retry
if status_code == 401:
raise NonRecoverableNetworkError(
"Received 401 - UNAUTHORIZED. Confirm your authentication credentials."
Expand Down