googleapis/google-cloud-python

add underlying cause for `TransportError`

Fechada

#15.181 aberto em 15 de dez. de 2023

 (2 comentários) (0 reação) (0 responsável)Python (1.481 forks)batch import
help wantedpriority: p3type: feature request

Métricas do repositório

Stars
 (4.304 estrelas)
Métricas de merge de PR
 (Mesclagem média 4d) (158 fundiu PRs em 30d)

Description

Is it possible to save a reference to the last exception thrown at:

https://github.com/googleapis/google-auth-library-python/blob/0afc61a3a9c3d5035c913ad4a7568e8a888e2ec9/google/auth/compute_engine/_metadata.py#L204

and use it to build a more meaningful error message? at:

https://github.com/googleapis/google-auth-library-python/blob/0afc61a3a9c3d5035c913ad4a7568e8a888e2ec9/google/auth/compute_engine/_metadata.py#L217-L220

that way the underlying reason for the TransportError would be available even if DEBUG logging level is not enabled.

Guia do colaborador