{"record":{"id":"132c2a5ff9273917","repo":"usebruno/bruno","slug":"invalid-collectionformat-format","errorCode":null,"errorMessage":"Invalid collectionformat: ${format}","messagePattern":"Invalid collectionformat: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/collection.js","lineNumber":302,"sourceCode":"        const {\n          brunoConfig: parsedBrunoConfig,\n          collectionRoot\n        } = parseCollection(content, { format });\n\n        brunoConfig = parsedBrunoConfig;\n        brunoConfig.name = collectionName;\n\n        const newContent = stringifyCollection(collectionRoot, brunoConfig, { format });\n        await writeFile(path.join(dirPath, 'opencollection.yml'), newContent);\n      } else if (format === 'bru') {\n        const configFilePath = path.join(previousPath, 'bruno.json');\n        const content = fs.readFileSync(configFilePath, 'utf8');\n        brunoConfig = JSON.parse(content);\n        brunoConfig.name = collectionName;\n        const newContent = await stringifyJson(brunoConfig);\n        await writeFile(path.join(dirPath, 'bruno.json'), newContent);\n      } else {\n        throw new Error(`Invalid collectionformat: ${format}`);\n      }\n\n      // Now copy all the files matching the collection's filetype along with the dir\n      const files = searchForRequestFiles(previousPath);\n\n      for (const sourceFilePath of files) {\n        const relativePath = path.relative(previousPath, sourceFilePath);\n        const newFilePath = path.join(dirPath, relativePath);\n\n        // skip if the file is opencollection.yml or bruno.json at the root of the collection\n        const isRootConfigFile = (path.basename(sourceFilePath) === 'opencollection.yml' || path.basename(sourceFilePath) === 'bruno.json')\n          && path.dirname(sourceFilePath) === previousPath;\n\n        if (isRootConfigFile) {\n          continue;\n        }\n\n        // handle dir of files","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/collection.js#L284-L320","documentation":"Error \"Invalid collectionformat: ${format}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/collection.js:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a valid collection format value supported by this Bruno version."],"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"}