{"record":{"id":"543bf18003dd65df","repo":"toeverything/AFFiNE","slug":"result-error","errorCode":null,"errorMessage":"result.error","messagePattern":"result\\.error","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx","lineNumber":54,"sourceCode":"    if (saving) {\n      return;\n    }\n    setSaving(true);\n    try {\n      track.$.settingsPanel.workspace.export({\n        type: 'workspace',\n      });\n\n      const result = await desktopApi.handler?.dialog.saveDBFileAs(\n        universalId({\n          peer: workspace.flavour,\n          type: 'workspace',\n          id: workspace.id,\n        }),\n        workspace.name$.getValue() ?? 'db'\n      );\n      if (result?.error) {\n        throw new Error(result.error);\n      } else if (!result?.canceled) {\n        notify.success({ title: t['Export success']() });\n      }\n    } catch (e: any) {\n      notify.error({ title: t['Export failed'](), message: e.message });\n    } finally {\n      setSaving(false);\n    }\n  }, [desktopApi, saving, t, workspace]);\n\n  if (fullSynced) {\n    return (\n      <SettingRow\n        name={t['Full Backup']()}\n        desc={t['Full Backup Description']()}\n      >\n        <Button\n          variant=\"primary\"","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx#L36-L72","documentation":"The desktop dialog.saveDBFileAs IPC completed but reported an error in its result envelope (result.error), meaning the backend failed to export/save the workspace SQLite DB file; the panel rethrows it so the catch block can show a notification with the native error text.","triggerScenarios":"Thrown when desktopApi.handler.dialog.saveDBFileAs resolves with an error field, i.e. the native export of the workspace database file failed.","commonSituations":"Exporting a workspace backup from settings fails at the save step. Check disk space and write permissions of the chosen folder and try again.","solutions":["Retry the export; inspect result.error details in the console.","Check disk space and permissions for the export target."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}