{"record":{"id":"ff70fa8c9f52ca43","repo":"diegosouzapw/OmniRoute","slug":"failed-to-read-grok-build-settings","errorCode":null,"errorMessage":"Failed to read Grok Build settings","messagePattern":"Failed to read Grok Build settings","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx","lineNumber":160,"sourceCode":"  const hydrateStatus = useCallback((next: GrokStatus) => {\n    setStatus(next);\n    setModel(next.config?.model?.model ?? \"\");\n    setSubagentModels(\n      Object.fromEntries(\n        SUBAGENTS.flatMap((type) => {\n          const value = next.config?.subagentModels?.[type]?.model;\n          return value ? [[type, value]] : [];\n        })\n      )\n    );\n  }, []);\n\n  const refreshStatus = useCallback(async () => {\n    setChecking(true);\n    try {\n      const response = await fetch(SETTINGS_ENDPOINT);\n      const body = (await response.json()) as GrokStatus;\n      if (!response.ok) throw new Error(errorText(body, \"Failed to read Grok Build settings\"));\n      hydrateStatus(body);\n    } catch (error) {\n      setMessage({ type: \"error\", text: error instanceof Error ? error.message : String(error) });\n    } finally {\n      setChecking(false);\n    }\n  }, [hydrateStatus]);\n\n  const refreshEndpoints = useCallback(async () => {\n    const requests = [\n      fetch(\"/api/settings\"),\n      fetch(\"/api/tunnels/cloudflared\"),\n      fetch(\"/api/tunnels/tailscale\"),\n      fetch(\"/api/tunnels/ngrok\"),\n    ];\n    const results = await Promise.allSettled(requests);\n    const bodies = await Promise.all(\n      results.map(async (result) =>","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx#L142-L178","documentation":"Error \"Failed to read Grok Build settings\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:160 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"}