Skip to content

Commit

Permalink
Fix log error in oauth.py (#269)
Browse files Browse the repository at this point in the history
* Duplicate of applicable change from #93

Signed-off-by: Jesse Whitehouse <[email protected]>

* Update changelog

Signed-off-by: Jesse Whitehouse <[email protected]>

* Fix after merge

Signed-off-by: Levko Kravets <[email protected]>

---------

Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Levko Kravets <[email protected]>
Co-authored-by: Levko Kravets <[email protected]>
  • Loading branch information
susodapop and kravets-levko authored May 29, 2024
1 parent 6949aba commit a6212b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/sql/auth/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a6212b6

Please sign in to comment.