diegosouzapw/OmniRoute · error · Error

result?.error?.message || result?.error || result?.message…

Error message

result?.error?.message || result?.error || result?.message || t("suiteBuilderDeleteFailed")

What it means

Suite delete failure: after window.confirm, the DELETE to /api/evals/suites/{id} returned non-ok; the thrown message cascades result.error.message → result.error → result.message → localized 'suiteBuilderDeleteFailed'. The custom suite still exists (only source==='custom' suites are deletable — a non-custom suite never reaches the fetch).

Solutions

  1. Check the cascade fields in the response for the server's reason
  2. Confirm the suite is custom and not currently running (409)
  3. Refresh the list and retry the delete
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/usage/components/EvalsTab.tsx:766 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/12ab19a5573d8dad. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/usage/components/EvalsTab.tsx:766

      setSavingSuite(false);
    }
  }

  async function handleDeleteSuite(suite: EvalSuite) {
    if (suite.source !== "custom") return;
    const confirmDelete = window.confirm(
      t("suiteBuilderDeleteConfirm", { name: suite.name || suite.id })
    );
    if (!confirmDelete) return;

    setDeletingSuiteId(suite.id);
    try {
      const response = await fetch(`/api/evals/suites/${encodeURIComponent(suite.id)}`, {
        method: "DELETE",
      });
      const result = await response.json();
      if (!response.ok) {
        throw new Error(
          result?.error?.message ||
            result?.error ||
            result?.message ||
            t("suiteBuilderDeleteFailed")
        );
      }
      await refreshDashboard();
      if (expanded === suite.id) {
        setExpanded(null);
      }
      notify.success(
        t("suiteBuilderDeleted"),
        t("notifyEvalTitle", { name: suite.name || suite.id })
      );
    } catch (error: any) {
      notify.error(
        t("notifyEvalRunFailedWithReason", {
          reason: error?.message || t("notAvailableSymbol"),

View on GitHub (pinned to a179ffed5b)