diegosouzapw/OmniRoute · error · Error

data?.error || "Failed to select identity"

Error message

data?.error || "Failed to select identity"

What it means

Thrown when selecting an identity (account chooser index) during Volcano connect fails — non-OK response or error field set. Indicates the session was invalid, the index was out of range, or the upstream rejected the identity choice.

Solutions

  1. Retry the identity selection
  2. Restart the login flow if the session expired mid-choice
  3. Verify the account actually has multiple identities server-side
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/VolcengineConnectModal.tsx:279 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/78f886c569f1c040. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/VolcengineConnectModal.tsx:279

            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ index }),
          }
        );
        const data = await response.json().catch(() => ({}));
        if (data?.session) {
          setSession((prev) => (prev ? { ...prev, ...data.session } : data.session));
          if (
            data.session.phase === "starting" ||
            data.session.phase === "sending_code" ||
            data.session.phase === "submitting"
          ) {
            startPolling(data.session.sessionId);
          } else if (data.session.phase === "success") {
            void onConnected();
          }
        } else {
          throw new Error(data?.error || "Failed to select identity");
        }
      } catch (error) {
        notify.error(error instanceof Error ? error.message : "Failed to select identity");
      } finally {
        setSelectingIdentity(false);
      }
    },
    [session, notify, startPolling, onConnected]
  );

  const handleResend = useCallback(async () => {
    if (!session || resendCountdown > 0) return;
    setResending(true);
    try {
      const response = await fetch(
        `/api/providers/volcengine-plan/connect/${session.sessionId}/resend`,
        { method: "POST" }
      );

View on GitHub (pinned to a179ffed5b)