{"record":{"id":"b134315a21aa1bce","repo":"diegosouzapw/OmniRoute","slug":"res-status-403-t-apikeyrevealdisabled-t","errorCode":null,"errorMessage":"res.status === 403 ? t(\"apiKeyRevealDisabled\") : t(\"apiKeyRevealFailed\", { status: res.status })","messagePattern":"res\\.status === 403 \\? t\\(\"apiKeyRevealDisabled\"\\) : t\\(\"apiKeyRevealFailed\", (.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx","lineNumber":248,"sourceCode":"    if (tryingEndpoint === key) {\n      setTryingEndpoint(null);\n      setTryResult(null);\n      return;\n    }\n    setTryingEndpoint(key);\n    setTryResult(null);\n    setTryBody(generateExampleBody(ep));\n  };\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","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx#L230-L266","documentation":"Error \"res.status === 403 ? t(\"apiKeyRevealDisabled\") : t(\"apiKeyRevealFailed\", { status: res.status })\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx:248 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"}