(error: unknown)
| 92 | * with a raw SSL code. Surfacing the likely fix saves a support round-trip. |
| 93 | */ |
| 94 | export function getSSLErrorHint(error: unknown): string | null { |
| 95 | const details = extractConnectionErrorDetails(error) |
| 96 | if (!details?.isSSLError) { |
| 97 | return null |
| 98 | } |
| 99 | return `SSL certificate error (${details.code}). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist *.anthropic.com. Run /doctor for details.` |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Strips HTML content (e.g., CloudFlare error pages) from a message string, |
no test coverage detected