diegosouzapw/OmniRoute · error · Error

t("apiKeyRevealInvalid")

Error message

t("apiKeyRevealInvalid")

What it means

Error "t("apiKeyRevealInvalid")" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx:256

  };

  const revealSelectedApiKey = async () => {
    if (!selectedApiKey) return "";
    if (revealedApiKeys[selectedApiKey.id]) return revealedApiKeys[selectedApiKey.id];

    const res = await fetch(`/api/keys/${encodeURIComponent(selectedApiKey.id)}/reveal`, {
      credentials: "same-origin",
    });
    if (!res.ok) {
      throw new Error(
        res.status === 403
          ? t("apiKeyRevealDisabled")
          : t("apiKeyRevealFailed", { status: res.status })
      );
    }
    const data = await res.json();
    if (!data?.key || typeof data.key !== "string") {
      throw new Error(t("apiKeyRevealInvalid"));
    }
    setRevealedApiKeys((current) => ({ ...current, [selectedApiKey.id]: data.key }));
    return data.key;
  };

  const executeTryIt = async (ep: Endpoint) => {
    setTrying(true);
    try {
      const headers: Record<string, string> = {};

      // Add Authorization header if endpoint requires auth
      if (ep.security) {
        let apiKeyForRequest = "";
        if (useManualKey) {
          apiKeyForRequest = manualApiKey;
        } else if (selectedApiKey) {
          apiKeyForRequest = await revealSelectedApiKey();
        }

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx:256 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/775a3c19b256dcef. Report an issue: GitHub.