toeverything/AFFiNE · error · Error

result.error

Error message

result.error

What it means

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.

Source

Thrown at packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx:54

    if (saving) {
      return;
    }
    setSaving(true);
    try {
      track.$.settingsPanel.workspace.export({
        type: 'workspace',
      });

      const result = await desktopApi.handler?.dialog.saveDBFileAs(
        universalId({
          peer: workspace.flavour,
          type: 'workspace',
          id: workspace.id,
        }),
        workspace.name$.getValue() ?? 'db'
      );
      if (result?.error) {
        throw new Error(result.error);
      } else if (!result?.canceled) {
        notify.success({ title: t['Export success']() });
      }
    } catch (e: any) {
      notify.error({ title: t['Export failed'](), message: e.message });
    } finally {
      setSaving(false);
    }
  }, [desktopApi, saving, t, workspace]);

  if (fullSynced) {
    return (
      <SettingRow
        name={t['Full Backup']()}
        desc={t['Full Backup Description']()}
      >
        <Button
          variant="primary"

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Retry the export; inspect result.error details in the console.
  2. Check disk space and permissions for the export target.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown when desktopApi.handler.dialog.saveDBFileAs resolves with an error field, i.e. the native export of the workspace database file failed.

Common situations: Exporting a workspace backup from settings fails at the save step. Check disk space and write permissions of the chosen folder and try again.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/543bf18003dd65df. Report an issue: GitHub.