{"record":{"id":"457ff5eb31ce7ded","repo":"usebruno/bruno","slug":"collection-not-found-inside-insomnia-export","errorCode":null,"errorMessage":"Collection not found inside Insomnia export","messagePattern":"Collection not found inside Insomnia export","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-converters/src/insomnia/insomnia-to-bruno.js","lineNumber":259,"sourceCode":"    throw new Error('An error occurred while parsing the Insomnia v5 collection: ' + err.message);\n  }\n};\n\nconst parseInsomniaCollection = (data) => {\n  const brunoCollection = {\n    name: '',\n    uid: uuid(),\n    version: '1',\n    items: [],\n    environments: []\n  };\n\n  try {\n    const insomniaResources = get(data, 'resources', []);\n    const insomniaCollection = insomniaResources.find((resource) => resource._type === 'workspace');\n\n    if (!insomniaCollection) {\n      throw new Error('Collection not found inside Insomnia export');\n    }\n\n    brunoCollection.name = insomniaCollection.name;\n\n    const requestsAndFolders\n      = insomniaResources.filter((resource) => resource._type === 'request' || resource._type === 'request_group')\n        || [];\n\n    function createFolderStructure(resources, parentId = null) {\n      const requestGroups\n        = resources.filter((resource) => resource._type === 'request_group' && resource.parentId === parentId) || [];\n      const requests = resources.filter((resource) => resource._type === 'request' && resource.parentId === parentId);\n\n      const folders = requestGroups.map((folder, index, allFolder) => {\n        const name = addSuffixToDuplicateName(folder, index, allFolder);\n        const requests = resources.filter(\n          (resource) => resource._type === 'request' && resource.parentId === folder._id\n        );","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-converters/src/insomnia/insomnia-to-bruno.js#L241-L277","documentation":"Error \"Collection not found inside Insomnia export\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-converters/src/insomnia/insomnia-to-bruno.js:259 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export a workspace/collection (not only a request or environment) from Insomnia.","Verify the export file contains a collection resource."],"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"}