{"record":{"id":"dfe175b2c5b891f2","repo":"diegosouzapw/OmniRoute","slug":"t-apikeyrequired","errorCode":null,"errorMessage":"t(\"apiKeyRequired\")","messagePattern":"t\\(\"apiKeyRequired\"\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx","lineNumber":279,"sourceCode":"\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        }\n\n        if (apiKeyForRequest) {\n          headers[\"Authorization\"] = `Bearer ${apiKeyForRequest}`;\n        } else {\n          throw new Error(t(\"apiKeyRequired\"));\n        }\n      }\n\n      const res = await fetch(\"/api/openapi/try\", {\n        method: \"POST\",\n        headers: { \"Content-Type\": \"application/json\" },\n        body: JSON.stringify({\n          method: ep.method,\n          path: ep.path,\n          headers,\n          body: tryBody ? JSON.parse(tryBody) : undefined,\n        }),\n      });\n      if (res.ok) setTryResult(await res.json());\n      else {\n        const err = await res.json().catch(() => ({}));\n        throw new Error(err.error || t(\"requestFailed\", { status: res.status }));\n      }","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx#L261-L297","documentation":"Error \"t(\"apiKeyRequired\")\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/endpoint/ApiEndpointsTab.tsx:279 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"}