(error: unknown)
| 84 | // --------------------------------------------------------------------------- |
| 85 | |
| 86 | function isAuthError(error: unknown): boolean { |
| 87 | const appError = extractAppCommandError(error) |
| 88 | if (appError?.code === "authentication_failed") return true |
| 89 | |
| 90 | const msg = appError?.detail ?? appError?.message ?? String(error) |
| 91 | const lower = msg.toLowerCase() |
| 92 | return ( |
| 93 | lower.includes("authentication failed") || |
| 94 | lower.includes("could not read username") || |
| 95 | lower.includes("could not read password") || |
| 96 | lower.includes("logon failed") |
| 97 | ) |
| 98 | } |
| 99 | |
| 100 | function extractHost(url: string): string | null { |
| 101 | const trimmed = url.trim() |
no test coverage detected