Skip to content

Add real return code on UnsafeToRetryError #508

Description

@Uranium2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions