{"record":{"id":"499385f236b59a42","repo":"siyuan-note/siyuan","slug":"response-msg-failed-to-update-the-global-plugi","errorCode":null,"errorMessage":"response.msg || \"Failed to update the global plugin state\"","messagePattern":"response\\.msg \\|\\| \"Failed to update the global plugin state\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/plugin/globalState.ts","lineNumber":53,"sourceCode":"\nexport const applyPluginReload = (app: App, data: IPluginReloadData = {}) => {\n    if (!isGlobalPluginState(data)) {\n        return reloadPlugin(app, data);\n    }\n    return getCoordinator(app).apply(data);\n};\n\nexport const syncGlobalPluginConfig = (app: App, petalDisabled: boolean) => {\n    getCoordinator(app).syncConfig(petalDisabled);\n};\n\nexport const subscribeGlobalPluginState = (app: App, listener: (state: IGlobalPluginStateSnapshot) => void) =>\n    getCoordinator(app).subscribe(listener);\n\nexport const setGlobalPluginsDisabled = async (app: App, petalDisabled: boolean) => {\n    const response = await fetchSyncPost(\"/api/setting/setBazaarPetalDisabled\", {petalDisabled});\n    if (response.code !== 0 || !response.data) {\n        throw new Error(response.msg || \"Failed to update the global plugin state\");\n    }\n    await applyPluginReload(app, response.data as TGlobalPluginReloadData);\n};\n","sourceCodeStart":35,"sourceCodeEnd":57,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/app/src/plugin/globalState.ts#L35-L57","documentation":"In setGlobalPluginsDisabled, the kernel call that persists the global plugin enabled/disabled state returned a non-zero code. The message is the kernel response msg, or the fallback text 'Failed to update the global plugin state' when no msg was supplied.","triggerScenarios":"Thrown at app/src/plugin/globalState.ts:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check kernel logs for the failing /api call reason","Verify the workspace is writable and the kernel is responsive","Retry the toggle in Settings - Plugins after reconnection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}