googleapis/google-cloud-python

add underlying cause for `TransportError`

已关闭

#15,181 创建于 2023年12月15日

 (2 条评论) (0 个反应) (0 位负责人)Python (1,481 个派生)batch import
help wantedpriority: p3type: feature request

仓库指标

星标
 (4,304 个星标)
PR 合并指标
 (平均合并 4天) (30 天内合并 158 个 PR)

描述

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.

贡献者指南