diegosouzapw/OmniRoute · error · Error
Backup file not found: ${backupId}
Error message
Backup file not found: ${backupId} What it means
Error "Backup file not found: ${backupId}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/shared/services/backupService.ts:169
const dir = getToolBackupDir(toolId);
// Anchor backupId within the tool dir — prevent path traversal via backupId
const backupPath = safePath(toolId, backupId);
const metaPath = backupPath + ".meta.json";
// Read metadata to find original path
let meta;
try {
const raw = await fs.readFile(metaPath, "utf-8");
meta = JSON.parse(raw);
} catch {
throw new Error(`Backup metadata not found: ${backupId}`);
}
// Verify actual backup file exists
try {
await fs.access(backupPath);
} catch {
throw new Error(`Backup file not found: ${backupId}`);
}
// Before restoring, back up the current file (so restore is reversible)
await createBackup(toolId, meta.originalPath);
// Copy backup over the original
const targetDir = path.dirname(meta.originalPath);
await fs.mkdir(targetDir, { recursive: true });
await fs.copyFile(backupPath, meta.originalPath);
return {
restored: true,
backupId,
originalPath: meta.originalPath,
};
}
/**View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/shared/services/backupService.ts:169 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/cbfb02b7b117f494.
Report an issue: GitHub.