nodejs/undici

Unprecise error message on fetch() to an endpoint with a certificate which was signed by an "unkown" CA

已關閉

#2,199 建立於 2023年7月28日

 (5 則留言) (0 個反應) (0 位負責人)JavaScript (444 個分叉)batch import
enhancementgood first issue

倉庫指標

星標
 (5,319 顆星)
PR 合併指標
 (平均合併 2天 10小時) (30 天內合併 82 個 PR)

描述

Bug Description

There is a unprecise error message ("fetch failed") on fetch() to an endpoint with a certificate which was signed by an "unkown" CA. If its an custom or internal CA, the fetch() will fail, that seems correct, but the error message ist absolut unprecise. It is therefore very difficult to find the cause.

Reproducible By

fetch() to an enpoint with a certificate which was signed by an "unkown" CA.

An "unkown" CA seems to be an CA which not exist in the default search path for CAs of node. By default node seem to use CA-certificates baked in the build.

Expected Behavior

A useful error message is shown.

Logs & Screenshots

TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11576:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ...

Environment

Ubuntu 22.04 Node v18.17.0

貢獻者指南