Files
HealthLog/src/app/api
Marc-André Bombeck 564d7dec77 fix(ai): never 5xx from the connection test and report a categorised reason
The connection-test route mapped a provider 5xx to a 502, which a reverse
proxy rewrites to its own HTML error page; the browser's res.json() then
threw "Unexpected token '<'". Every provider-call failure now returns
HTTP 200 with a secret-free { ok:false, providerType, reason }. Reasons
are categorised: credential/auth (401/403, or a 5xx whose body signals an
invalidated/expired session), rate-limit (429), provider server error
(other 5xx) and network/timeout.

The empty-override "test my saved config" path now resolves through the
same provider chain generation uses, instead of the legacy codex->admin
probe that could test a different provider than the one generation runs.

The chain runner already advances past an auth-class failure to the next
enabled provider; add explicit coverage for that on the raw generation
path (401 -> next succeeds, fallback count incremented).
2026-06-03 08:56:19 +02:00
..
2026-05-30 00:10:12 +02:00
2026-05-29 22:07:10 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-16 14:19:57 +02:00
2026-05-31 14:36:17 +02:00
2026-05-16 03:17:00 +02:00
2026-05-29 22:07:10 +02:00
2026-05-14 23:49:32 +02:00
2026-05-14 23:49:32 +02:00
2026-05-29 22:07:10 +02:00
2026-05-31 14:36:17 +02:00