{"record":{"id":"7761da161cc4515c","repo":"diegosouzapw/OmniRoute","slug":"failed-to-reset-settings","errorCode":null,"errorMessage":"Failed to reset settings","messagePattern":"Failed to reset settings","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx","lineNumber":308,"sourceCode":"      });\n      const body: unknown = await response.json();\n      if (!response.ok) throw new Error(errorText(body, \"Failed to apply settings\"));\n      setMessage({ type: \"success\", text: \"Grok Build settings applied.\" });\n      await Promise.all([refreshStatus(), refreshBackups()]);\n    } catch (error) {\n      setMessage({ type: \"error\", text: error instanceof Error ? error.message : String(error) });\n    } finally {\n      setApplying(false);\n    }\n  };\n\n  const reset = async () => {\n    setResetting(true);\n    setMessage(null);\n    try {\n      const response = await fetch(SETTINGS_ENDPOINT, { method: \"DELETE\" });\n      const body: unknown = await response.json();\n      if (!response.ok) throw new Error(errorText(body, \"Failed to reset settings\"));\n      setMessage({ type: \"success\", text: \"Grok Build settings reset.\" });\n      await Promise.all([refreshStatus(), refreshBackups()]);\n    } catch (error) {\n      setMessage({ type: \"error\", text: error instanceof Error ? error.message : String(error) });\n    } finally {\n      setResetting(false);\n    }\n  };\n\n  const selectModel = (selection: unknown) => {\n    const value = (selection as { value?: unknown })?.value;\n    if (typeof value !== \"string\") return;\n    if (modelTarget === \"main\") setModel(value);\n    else if (modelTarget) setSubagentModels((current) => ({ ...current, [modelTarget]: value }));\n    setModelTarget(null);\n  };\n\n  const restoreBackup = async (backupId: string) => {","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx#L290-L326","documentation":"The reset action's request to the Grok Build SETTINGS_ENDPOINT (restore defaults) returned non-OK; errorText falls back to 'Failed to reset settings'. Server-side rejection of the reset — settings files were not reverted and the card shows the error message.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the reset action param on the settings endpoint","Surface the server error text","Check server logs for the failing reset request"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}