usebruno/bruno · error · Error
path: ${pathname} already exists
Error message
path: ${pathname} already exists What it means
Error "path: ${pathname} already exists" thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/ipc/apiSpec.js:46
} catch (error) {
return Promise.reject(error);
}
});
ipcMain.handle('renderer:create-api-spec', async (event, apiSpecName, apiSpecLocation, content = '', workspacePath = null) => {
try {
if (typeof apiSpecName !== 'string' || apiSpecName !== path.basename(apiSpecName)) {
throw new Error(`api spec: ${apiSpecName} is not a valid filename`);
}
validateApiSpec(apiSpecName);
if (typeof apiSpecLocation !== 'string' || !isDirectory(apiSpecLocation)) {
throw new Error(`path: ${apiSpecLocation} is not an existing directory`);
}
let pathname = path.join(apiSpecLocation, apiSpecName);
if (fs.existsSync(pathname)) {
throw new Error(`path: ${pathname} already exists`);
}
await writeFile(pathname, content);
openApiSpec(mainWindow, watcher, pathname, { workspacePath });
} catch (error) {
return Promise.reject(error);
}
});
ipcMain.handle('renderer:remove-api-spec', async (event, pathname, workspacePath = null) => {
try {
if (watcher && mainWindow) {
watcher.removeWatcher(pathname, mainWindow);
removeApiSpecUid(pathname);
if (workspacePath) {
const workspaceFilePath = path.join(workspacePath, 'workspace.yml');
if (fs.existsSync(workspaceFilePath)) {View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Choose a different name/location, or remove the existing file first.
When it happens
Trigger: Thrown at packages/bruno-electron/src/ipc/apiSpec.js:46 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/1e1e4d291b6ef181.
Report an issue: GitHub.