Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-956848 Store underlying error in SnowparkSQLException #1122

Merged
merged 8 commits into from
Nov 16, 2023
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 1.10.1 (TBD)

### New Features

- Add the `conn_error` attribute to `SnowflakeSQLException` that stores the whole underlying exception from `snowflake-connector-python`

### Bug Fixes

- DataFrame column names qouting check now supports newline characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def wrap(*args, **kwargs):
try:
return func(*args, **kwargs)
except snowflake.connector.errors.ProgrammingError as e:
query = None
if "query" in e.__dict__:
query = e.__getattribute__("query")
query = getattr(e, "query", None)
tb = sys.exc_info()[2]
assert e.msg is not None
if "unexpected 'as'" in e.msg.lower():
Expand Down
Loading
Loading