Files
OmniRoute/tests/unit/ui
Diego Rodrigues de Sa e Souza c8f1d62de5 fix(dashboard): surface quota pool delete failures instead of failing silently (#8829)
The handler awaited the DELETE and never looked at the response:

    if (!confirm(t("removeConfirm"))) return;
    await fetch(`/api/quota/pools/${id}`, { method: "DELETE" });
    await mutate();

When the request failed — a 401 from an expired session, a 500, a dropped
connection — the page revalidated, the card stayed exactly where it was, and
nothing was shown. From the operator's side the click was indistinguishable
from a misclick, so the natural reaction is to click again. The page had no
error surface at all, unlike the sibling flow in the API manager which already
checked res.ok and rendered the message.

Adds a dismissible alert above the header, fed by both failure paths: a
non-ok response (appending the API's message when it sends one) and a thrown
request, which has no response to read. The alert clears on the next attempt,
so a transient failure does not leave a stale error on screen.

Reported against two boxes on 2026-07-28. The delete itself was working there
— the audit log shows the pools were removed — which is exactly what this
change makes visible either way.

Tests (vitest/jsdom, 5): non-ok response, thrown request, success path stays
quiet and still revalidates, a dismissed confirmation issues no DELETE at all,
and an earlier error clears once a later delete succeeds.
2026-07-28 03:35:28 -03:00
..
2026-07-02 10:47:13 -03:00
2026-06-20 14:55:24 -03:00
2026-06-27 09:07:12 -03:00
2026-06-29 08:40:06 -03:00
2026-06-27 09:07:12 -03:00
2026-06-15 03:32:11 -03:00
2026-06-27 09:07:12 -03:00
2026-06-27 09:07:12 -03:00
2026-06-27 09:07:12 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-06-12 23:49:22 -03:00
2026-06-29 08:40:06 -03:00
2026-06-19 06:49:01 -03:00
2026-06-27 09:07:12 -03:00
2026-06-27 09:07:12 -03:00