Files
HaloKeymind/webui
agessaman 33d8766d48 fix(webconfig): report a missing endpoint honestly
A bare 404 carries no body, so r.json() rejected and the parse failure escaped
with no HTTP status attached. Every caller then had to treat "this route does
not exist" as an ambiguous network failure — for the CLI that meant ~14 seconds
of polling before reporting a lost connection, which is the wrong diagnosis and
the wrong wait.

api() now substitutes an empty object when an *error* response has no readable
JSON, so the status survives onto the error. Successful responses must still
parse, or a captive portal's HTML would sail through as valid config.

The CLI names the case outright: firmware without /api/cli says so in 100ms
instead of retrying a route that will never exist.
2026-08-07 23:01:52 -07:00
..