{"record":{"id":"541bdadcdfcbc9b6","repo":"tinyhumansai/openhuman","slug":"privacy-mode-failed-to-set-privacy-mode","errorCode":null,"errorMessage":"[privacy-mode] failed to set privacy mode:","messagePattern":"\\[privacy-mode\\] failed to set privacy mode:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/settings/panels/PrivacyModeSection.tsx","lineNumber":81,"sourceCode":"    };\n  }, []);\n\n  const handleSelect = useCallback(\n    async (next: PrivacyMode) => {\n      if (next === mode) return;\n      log('[privacy-mode] setting mode', next);\n      setStatus('saving');\n      setError(null);\n      try {\n        const resp = await callCoreRpc<{ result: PrivacyModeResult }>({\n          method: CORE_RPC_METHODS.configSetPrivacyMode,\n          params: { mode: next },\n        });\n        setMode(resp.result.mode);\n        setStatus('saved');\n        setTimeout(() => setStatus('idle'), 2000);\n      } catch (err) {\n        console.warn('[privacy-mode] failed to set privacy mode:', err);\n        setError(err instanceof Error ? err.message : String(err));\n        setStatus('error');\n      }\n    },\n    [mode]\n  );\n\n  return (\n    <SettingsSection title={t('privacy.mode.title')}>\n      <div className=\"p-4 flex flex-col gap-3\">\n        <p className=\"text-xs text-content-muted leading-relaxed\">\n          {t('privacy.mode.description')}\n        </p>\n        <div className=\"flex flex-col gap-2\" data-testid=\"privacy-mode-options\">\n          {MODES.map(({ value, labelKey, descKey }) => {\n            const isSelected = mode === value;\n            return (\n              <button","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/settings/panels/PrivacyModeSection.tsx#L63-L99","documentation":"The settings UI's call to configSetPrivacyMode core RPC failed while applying a newly selected privacy mode, so the effective privacy mode did not change. The catch sets an inline error surfaced in the section and resets the status machine from 'saving' — the radio stays on the previous mode, which remains authoritative.","triggerScenarios":"Thrown at app/src/components/settings/panels/PrivacyModeSection.tsx:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the console-warned error to distinguish transport failure (core unreachable) from config rejection (invalid mode value)","Verify the core process is running and the RPC bearer token is valid — retry after a core restart","Retry the selection once the underlying cause is fixed; the UI guards re-entry while status === 'saving'","If it persistently fails, check the core log for the config.update handler's reason"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}