diff --git a/CHANGELOG.md b/CHANGELOG.md index 16462554a..1e0b34bcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +# (Unreleased) + +- Fix: our logger would raise an uncaught exception under certain oauth error conditions + # 3.1.2 (2024-04-18) - Remove broken cookie code (#379) diff --git a/src/databricks/sql/auth/oauth.py b/src/databricks/sql/auth/oauth.py index 78f516fee..806df08fe 100644 --- a/src/databricks/sql/auth/oauth.py +++ b/src/databricks/sql/auth/oauth.py @@ -125,7 +125,7 @@ def __get_authorization_code(self, client, auth_url, scope, state, challenge): logger.info(f"Port {port} is in use") last_error = e except Exception as e: - logger.error("unexpected error", e) + logger.error("unexpected error: %s", e) if self.redirect_port is None: logger.error( f"Tried all the ports {self.port_range} for oauth redirect, but can't find free port"