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

Give Trino an exception type for connection errors #364

Closed
1 task done
bendemott opened this issue Apr 27, 2023 · 1 comment · Fixed by #393
Closed
1 task done

Give Trino an exception type for connection errors #364

bendemott opened this issue Apr 27, 2023 · 1 comment · Fixed by #393

Comments

@bendemott
Copy link
Contributor

Describe the feature

Wrap connection exceptions from underlying requests library with TrinoConnectionError (or example)

I don't want to include requests in my application to know when my Trino server connection has failed.

Example

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8081): 
    Max retries exceeded with url: /v1/statement (
        Caused by NewConnectionError(
            '<urllib3.connection.HTTPConnection object at 0x7efc0a320580>: 
                Failed to establish a new connection: [Errno 111] Connection refused'))

Describe alternatives you've considered

N/A

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@mdesmet
Copy link
Contributor

mdesmet commented May 24, 2023

This is definitely useful. Are you still working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants