Skip to content

Give Trino an exception type for connection errors #364

Closed
@bendemott

Description

@bendemott

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!

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