{"record":{"id":"c0ed18204f6ea341","repo":"usebruno/bruno","slug":"opencollection-yml-not-found","errorCode":null,"errorMessage":"opencollection.yml not found","messagePattern":"opencollection\\.yml not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/openapi-sync.js","lineNumber":256,"sourceCode":"    .replace(/\\?.*$/, '')\n    .replace(/{([^}]+)}/g, ':$1')\n    .replace(/\\/+/g, '/')\n    .replace(/\\/$/, '');\n};\n\n/**\n * Load bruno config from disk. Returns { format, brunoConfig, collectionRoot }.\n * collectionRoot is only set for yml format collections.\n */\nconst loadBrunoConfig = (collectionPath) => {\n  const format = getCollectionFormat(collectionPath);\n  let brunoConfig;\n  let collectionRoot;\n\n  if (format === 'yml') {\n    const configFilePath = path.join(collectionPath, 'opencollection.yml');\n    if (!fs.existsSync(configFilePath)) {\n      throw new Error('opencollection.yml not found');\n    }\n    const content = fs.readFileSync(configFilePath, 'utf8');\n    const parsed = parseCollection(content, { format });\n    brunoConfig = parsed.brunoConfig;\n    collectionRoot = parsed.collectionRoot;\n  } else {\n    const brunoJsonPath = path.join(collectionPath, 'bruno.json');\n    if (!fs.existsSync(brunoJsonPath)) {\n      throw new Error('bruno.json not found');\n    }\n    brunoConfig = JSON.parse(fs.readFileSync(brunoJsonPath, 'utf8'));\n  }\n\n  // Resolve relative openapi sourceUrls to absolute so all callers get consistent paths\n  if (Array.isArray(brunoConfig?.openapi)) {\n    brunoConfig.openapi = brunoConfig.openapi.map((entry) => ({\n      ...entry,\n      sourceUrl: resolveSourceUrl(collectionPath, entry.sourceUrl)","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/openapi-sync.js#L238-L274","documentation":"Error \"opencollection.yml not found\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/openapi-sync.js:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sync the collection with a remote OpenAPI spec first so opencollection.yml is created.","Verify the collection is an OpenAPI-linked collection."],"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"}