{"record":{"id":"775a3c19b256dcef","repo":"diegosouzapw/OmniRoute","slug":"t-apikeyrevealinvalid","errorCode":null,"errorMessage":"t(\"apiKeyRevealInvalid\")","messagePattern":"t\\(\"apiKeyRevealInvalid\"\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx","lineNumber":256,"sourceCode":"  };\n\n  const revealSelectedApiKey = async () => {\n    if (!selectedApiKey) return \"\";\n    if (revealedApiKeys[selectedApiKey.id]) return revealedApiKeys[selectedApiKey.id];\n\n    const res = await fetch(`/api/keys/${encodeURIComponent(selectedApiKey.id)}/reveal`, {\n      credentials: \"same-origin\",\n    });\n    if (!res.ok) {\n      throw new Error(\n        res.status === 403\n          ? t(\"apiKeyRevealDisabled\")\n          : t(\"apiKeyRevealFailed\", { status: res.status })\n      );\n    }\n    const data = await res.json();\n    if (!data?.key || typeof data.key !== \"string\") {\n      throw new Error(t(\"apiKeyRevealInvalid\"));\n    }\n    setRevealedApiKeys((current) => ({ ...current, [selectedApiKey.id]: data.key }));\n    return data.key;\n  };\n\n  const executeTryIt = async (ep: Endpoint) => {\n    setTrying(true);\n    try {\n      const headers: Record<string, string> = {};\n\n      // Add Authorization header if endpoint requires auth\n      if (ep.security) {\n        let apiKeyForRequest = \"\";\n        if (useManualKey) {\n          apiKeyForRequest = manualApiKey;\n        } else if (selectedApiKey) {\n          apiKeyForRequest = await revealSelectedApiKey();\n        }","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx#L238-L274","documentation":"Error \"t(\"apiKeyRevealInvalid\")\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}