Skip to content

Header info didn't have x_token_server #484

@JonMerlevede

Description

@JonMerlevede

Expected behavior

When using OAuth authentication and posting an access token that is no longer valid but can be refreshed, the Trino Python client refreshes the token without requiring user interaction.

Actual behavior

When using OAuth authentication and posting an access token that is no longer valid but that can be refreshed, the Trino Python client crashes with the exception:

trino.exceptions.TrinoAuthError: Error: header info didn't have x_token_server

Steps To Reproduce

  • Obtain an access token from Trino through the OAuth flow, and let Trino save it to your keyring.
  • Wait until the access token expires, but not so long that the token can no longer be refreshed.
  • Make another call to Trino.

This issue has also been reported in the trino dbt client: starburstdata/dbt-trino#432.

Log output

No response

Operating System

Mac

Trino Python client version

0.329.0

Trino Server version

443-e.7

Python version

Python 3.10.3

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    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