toeverything/AFFiNE · error · DOMException
AbortError
AbortError
Error message
Import cancelled
What it means
commitNativeImport checks the caller-supplied AbortSignal before starting; if the signal is already aborted the import is cancelled upfront by throwing a DOMException('Import cancelled', 'AbortError') instead of creating a session.
Source
Thrown at packages/frontend/core/src/desktop/dialogs/import/native-backend.ts:33
const NATIVE_IMPORT_BATCH_LIMITS = {
maxDocs: 20,
maxBlobs: 20,
maxBlobBytes: 10 * 1024 * 1024,
};
export async function commitNativeImport(
format: NativeImportFormat,
source: File | File[],
commitService: ImportCommitService,
options: {
signal?: AbortSignal;
onProgress?: (progress: { completed: number; total: number }) => void;
} = {}
): Promise<ImportCommitResult> {
const native = await getNativeImporter();
if (options.signal?.aborted) {
throw new DOMException('Import cancelled', 'AbortError');
}
const sessionId = await native.createImportSession({
format,
source: getNativeImportSource(source),
batchLimits: NATIVE_IMPORT_BATCH_LIMITS,
});
const docIds: string[] = [];
const warnings: ImportCommitResult['warnings'] = [];
let entryId: string | undefined;
let isWorkspaceFile = false;
let rootFolderId: string | undefined;
let cancelled = false;
try {
for (;;) {
if (options.signal?.aborted) {
cancelled = true;View on GitHub (pinned to b4c8548c09)
Solutions
- No action needed; the user cancelled the import dialog.
- Re-open the import dialog to start a new import.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown as an AbortError DOMException in commitNativeImport when the provided AbortSignal is aborted, either before starting or between import batches.
Common situations: Expected when the user cancels an in-progress desktop import or the dialog closes. It is a normal cancellation path, not a failure.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/312736ece3f99944.
Report an issue: GitHub.