Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Whitehouse <jesse@whitehouse.dev>
  • Loading branch information
susodapop committed Mar 15, 2024
1 parent 0f5f6cd commit eca9063
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/databricks/sql/auth/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,11 @@ def should_retry(self, method: str, status_code: int) -> Tuple[bool, str]:
# Request succeeded. Don't retry.
if status_code == 200:
return False, "200 codes are not retried"

if status_code == 403:
raise NonRecoverableNetworkError("Received 403 - FORBIDDEN. Confirm your authentication credentials.")
raise NonRecoverableNetworkError(
"Received 403 - FORBIDDEN. Confirm your authentication credentials."
)

# Request failed and server said NotImplemented. This isn't recoverable. Don't retry.
if status_code == 501:
Expand Down

0 comments on commit eca9063

Please sign in to comment.