diff --git a/src/databricks/sql/auth/retry.py b/src/databricks/sql/auth/retry.py index a803b17c..eee6f839 100644 --- a/src/databricks/sql/auth/retry.py +++ b/src/databricks/sql/auth/retry.py @@ -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: