{"record":{"id":"da022477f77b5eb3","repo":"usebruno/bruno","slug":"migration-cancelled","errorCode":null,"errorMessage":"Migration cancelled","messagePattern":"Migration cancelled","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/yml-migration.js","lineNumber":260,"sourceCode":"  // double-processed as live changes) and clear every cache keyed by the deterministic\n  // path-derived uid, so the post-migration reopen loads genuinely fresh state.\n  if (watcher) {\n    watcher.removeWatcher(collectionPathname, mainWindow, collectionUid);\n  }\n  try {\n    await unmount(collectionUid);\n  } catch (_) {}\n  clearCollectionIndex(collectionPathname);\n  clearBrunoConfig(collectionUid);\n  clearRequestUidsForCollection(collectionPathname);\n  migrationCancellations.delete(collectionUid);\n\n  const emitProgress = (phase, current, total) => {\n    mainWindow.webContents.send('main:collection-migration-progress', { collectionUid, phase, current, total });\n  };\n  const checkCancelled = () => {\n    if (migrationCancellations.has(collectionUid)) {\n      throw new Error(MIGRATION_CANCELLED_MESSAGE);\n    }\n  };\n  const reportError = (message) => {\n    mainWindow.webContents.send('main:display-error', { message });\n  };\n  // The renderer dropped the collection from its store before invoking us, so on every\n  // exit — success, failure or cancel — re-open from disk; the renderer re-creates and\n  // mounts it fresh via the normal main:collection-opened flow (same deterministic uid).\n  // openCollection catches load errors and returns { opened: false, error } rather than\n  // always throwing, so treat that shape as failure too.\n  const reopenCollection = async () => {\n    let result;\n    try {\n      result = await openCollection(mainWindow, watcher, collectionPathname);\n    } catch (reopenError) {\n      console.error('Failed to reopen collection after migration:', reopenError);\n      throw reopenError;\n    }","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/yml-migration.js#L242-L278","documentation":"Error \"Migration cancelled\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/yml-migration.js:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the migration and confirm when prompted if you want to proceed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}