{"record":{"id":"d899b19fec8527f6","repo":"usebruno/bruno","slug":"invalid-format-format","errorCode":null,"errorMessage":"Invalid format: ${format}","messagePattern":"Invalid format: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/collection.js","lineNumber":242,"sourceCode":"        if (format === 'yml') {\n          const collectionRoot = {\n            meta: {\n              name: collectionName\n            }\n          };\n          brunoConfig = {\n            opencollection: '1.0.0',\n            name: collectionName,\n            type: 'collection',\n            ignore: ['node_modules', '.git']\n          };\n          const content = stringifyCollection(collectionRoot, brunoConfig, { format });\n          await writeFile(path.join(dirPath, 'opencollection.yml'), content);\n        } else if (format === 'bru') {\n          const content = await stringifyJson(brunoConfig);\n          await writeFile(path.join(dirPath, 'bruno.json'), content);\n        } else {\n          throw new Error(`Invalid format: ${format}`);\n        }\n\n        await writeFile(path.join(dirPath, '.gitignore'), DEFAULT_GITIGNORE);\n\n        let persistedConfig = await getCollectionConfigFile(dirPath);\n        persistedConfig = await transformBrunoConfigAfterRead(persistedConfig, dirPath);\n\n        const { size, filesCount } = await getCollectionStats(dirPath);\n        persistedConfig.size = size;\n        persistedConfig.filesCount = filesCount;\n\n        mainWindow.webContents.send('main:collection-opened', dirPath, uid, persistedConfig);\n        ipcMain.emit('main:collection-opened', mainWindow, dirPath, uid, persistedConfig);\n      } catch (error) {\n        return Promise.reject(error);\n      }\n    }\n  );","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/collection.js#L224-L260","documentation":"Error \"Invalid format: ${format}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/collection.js:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported format value (e.g. 'yml' or 'json' as applicable).","Check the format argument passed in the request."],"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"}