mirror of
https://github.com/R0m1k3/EveFlow.git
synced 2026-10-20 21:58:56 +02:00
fix: portail laissant passer /health mais bloquant /v1 traité comme liaison en échec (v2.4.0.3) (#18)
- Une page web reçue sur /v1/capabilities fait échouer la connexion et le test de liaison même si /health répond, ce qui déclenche la recherche de l'API. - La découverte sonde /v1/capabilities puis /v1/models (JSON exigé, 401/403 accepté) avant /health, pour ne pas prendre un portail pour l'API. Claude-Session: https://claude.ai/code/session_017Wn5VX9HNbJ7N54hR24u9Y Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
df25dd591c
commit
d1b12c16c5
5 files changed
+26
-10
No files matched your search
@@ -122,6 +122,8 @@ export const useHermes = create<HermesStore>((set, get) => ({
|
||||
try {
|
||||
capabilities = await client.capabilities();
|
||||
} catch (err) {
|
||||
// A web page on /v1/* means the whole API is behind a portal even if /health passed through.
|
||||
if (/page web/.test((err as Error).message)) throw err;
|
||||
Log.warn('hermes', `capabilities unavailable: ${(err as Error).message}`);
|
||||
}
|
||||
const transport = resolveTransport(config, capabilities);
|
||||
|
||||
Reference in new issue
Block a user