diegosouzapw/OmniRoute · error · Error

payload?.error?.message || payload?.error ||…

Error message

payload?.error?.message || payload?.error || payload?.message || t("notifyEvalRunFailed")

What it means

Eval run kickoff failure inside run-all: the POST to /api/evals with suiteId + target (and optional compareTarget/apiKeyId) returned non-ok; the thrown message prefers payload.error.message → payload.error → payload.message → localized 'notifyEvalRunFailed'. The suite's cases did not execute (or partially failed); progress tracking marks it under failedSuites.

Solutions

  1. Read payload.error.message for the run rejection (bad target key, unknown API key id)
  2. Verify the target model and optional API key are valid
  3. Retry the suite run after correcting the target selection
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/usage/components/EvalsTab.tsx:847 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/fbdad40bff949fdf. Report an issue: GitHub.

Appendix: source

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

          completed,
          failedSuites,
        });

        try {
          const response = await fetch("/api/evals", {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({
              suiteId: suite.id,
              target: parseTargetKey(selectedTargetKey),
              ...(compareTargetKey ? { compareTarget: parseTargetKey(compareTargetKey) } : {}),
              ...(selectedApiKeyId ? { apiKeyId: selectedApiKeyId } : {}),
            }),
          });

          const payload = await response.json();
          if (!response.ok) {
            throw new Error(
              payload?.error?.message ||
                payload?.error ||
                payload?.message ||
                t("notifyEvalRunFailed")
            );
          }

          const runs = Array.isArray(payload.runs) ? (payload.runs as EvalRun[]) : [];
          const comparisonScorecard = (payload.scorecard || null) as EvalScorecard | null;
          setSuiteRuns((prev) => ({
            ...prev,
            [suite.id]: {
              runs,
              scorecard: comparisonScorecard,
            },
          }));

          if (Array.isArray(payload.recentRuns)) {

View on GitHub (pinned to a179ffed5b)