fix: add info suggestion for unsafely-ignore-certificate-errors and add --help=full (#28203)

For #27865
This commit is contained in:
Leo Kettmeir 2025-02-24 17:20:59 +01:00 committed by Ryan Dahl
parent c1926ff1c4
commit 26bf1e67d7
6 changed files with 72 additions and 58 deletions

View file

@ -437,6 +437,12 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec<FixSuggestion> {
"Run again with `--unstable-net` flag to enable this API.",
),
];
} else if msg.contains("client error (Connect): invalid peer certificate") {
return vec![
FixSuggestion::hint(
"Run again with the `--unsafely-ignore-certificate-errors` flag to bypass certificate errors.",
),
];
// Try to capture errors like:
// ```
// Uncaught Error: Cannot find module '../build/Release/canvas.node'