databricks-sql-python
databricks-sql-python copied to clipboard
Add real return code on `UnsafeToRetryError`
We are having random errors while fetching data with the connector to our databricks (serverless warehouse). We tried to debug the origin of this fail, but we were not able to find the source of the issue.
Is it possible to add more information on the return code when we can not perform a retry while making a statement with the cursor?
raise UnsafeToRetryError(
"ExecuteStatement command can only be retried for codes 429 and 503"
)
Could we add the real return code to this? So we can investigate better on our side. Something like this:
raise UnsafeToRetryError(
f"ExecuteStatement command can only be retried for codes 429 and 503. Got {status_code}"
)
Using databricks-sql-python==4.0.0
Hi @Uranium2 , thanks for the suggestion. Added a PR to address this.