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.

貢獻者指南