mirror of
https://github.com/ZSeven-W/openpencil.git
synced 2026-05-31 19:04:29 +07:00
Custom OpenAI-compatible providers surfaced Node's opaque `TypeError: fetch failed` whenever the upstream HTTP call failed (#121) — DNS, TLS handshake, connection refused, timeout — all collapsed to the same useless string. The actual reason was already on `error.cause` as a SystemError but never reached the user. Add `formatFetchError()` that walks the cause chain (including AggregateError emitted when undici tries multiple A records and each attempt fails) and prefixes the SystemError code so users see `ENOTFOUND: getaddrinfo ENOTFOUND api.foo.com` or `ECONNREFUSED: connect ECONNREFUSED 127.0.0.1:443` instead of `fetch failed`. Wire it into the model-list proxy (most common trigger from the AI Settings dialog) and the builtin chat stream. Closes #121 |
||
|---|---|---|
| .. | ||
| agent.ts | ||
| chat.ts | ||
| connect-acp.ts | ||
| connect-agent.ts | ||
| generate.ts | ||
| icon.ts | ||
| image-generate.ts | ||
| image-search.ts | ||
| image-service-test.ts | ||
| install-agent.ts | ||
| mcp-install.ts | ||
| models.ts | ||
| provider-models.ts | ||
| provider-url.ts | ||
| validate.ts | ||