Skip to content

Add real return code on UnsafeToRetryError #508

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

Open
Uranium2 opened this issue Feb 18, 2025 · 1 comment
Open

Add real return code on UnsafeToRetryError #508

Uranium2 opened this issue Feb 18, 2025 · 1 comment
Assignees

Comments

@Uranium2
Copy link

Uranium2 commented Feb 18, 2025

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?

source code

            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

@samikshya-db
Copy link
Contributor

Hi @Uranium2 , thanks for the suggestion. Added a PR to address this.

@samikshya-db samikshya-db self-assigned this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants