{"record":{"id":"e6ff1d37b067326a","repo":"usebruno/bruno","slug":"failed-to-rename-the-item-name","errorCode":null,"errorMessage":"Failed to rename the item name","messagePattern":"Failed to rename the item name","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js","lineNumber":931,"sourceCode":"\n      return new Promise((resolve, reject) => {\n        if (!collection) {\n          return reject(new Error('Collection not found'));\n        }\n\n        const collectionCopy = cloneDeep(collection);\n        const item = findItemInCollection(collectionCopy, itemUid);\n        if (!item) {\n          return reject(new Error('Unable to locate item'));\n        }\n\n        const { ipcRenderer } = window;\n\n        const renameName = async () => {\n          return ipcRenderer.invoke('renderer:rename-item-name', { itemPath: item.pathname, newName, collectionPathname: collection.pathname }).catch((err) => {\n            toast.error('Failed to rename the item name');\n            console.error(err);\n            throw new Error('Failed to rename the item name');\n          });\n        };\n\n        const renameFile = async () => {\n          const dirname = path.dirname(item.pathname);\n          let newPath = '';\n          if (item.type === 'folder') {\n            newPath = path.join(dirname, trim(newFilename));\n          } else {\n            const filename = resolveRequestFilename(newFilename, collection.format);\n            newPath = path.join(dirname, filename);\n          }\n\n          return ipcRenderer\n            .invoke('renderer:rename-item-filename', { oldPath: item.pathname, newPath, newName, newFilename, collectionPathname: collection.pathname })\n            .catch((err) => {\n              console.error(err);\n              throw new Error('Duplicate request names are not allowed under the same folder');","sourceCodeStart":913,"sourceCodeEnd":949,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js#L913-L949","documentation":"Error \"Failed to rename the item name\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js:931 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a different name that does not conflict with existing items.","Check you have write permission to the item's file on disk."],"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"}