{"record":{"id":"aa5774319c84c754","repo":"usebruno/bruno","slug":"an-error-occurred-while-parsing-the-insomnia-colle","errorCode":null,"errorMessage":"An error occurred while parsing the Insomnia collection: ${err.message}","messagePattern":"An error occurred while parsing the Insomnia collection: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-converters/src/insomnia/insomnia-to-bruno.js","lineNumber":299,"sourceCode":"          name,\n          type: 'folder',\n          items: createFolderStructure(resources, folder._id).concat(\n            requests.filter((r) => r.parentId === folder._id).map(transformInsomniaRequestItem)\n          )\n        };\n      });\n\n      return folders.concat(requests.map(transformInsomniaRequestItem));\n    }\n\n    brunoCollection.items = createFolderStructure(requestsAndFolders, insomniaCollection._id);\n\n    // Build environments from resources\n    brunoCollection.environments = buildV4Environments(insomniaResources, insomniaCollection._id);\n    return brunoCollection;\n  } catch (err) {\n    console.error('Error parsing collection:', err);\n    throw new Error('An error occurred while parsing the Insomnia collection: ' + err.message);\n  }\n};\n\nexport const insomniaToBruno = (insomniaCollection) => {\n  try {\n    if (typeof insomniaCollection !== 'object') {\n      insomniaCollection = jsyaml.load(insomniaCollection, { schema: jsyaml.JSON_SCHEMA });\n    }\n    let collection;\n    if (isInsomniaV5Export(insomniaCollection)) {\n      collection = parseInsomniaV5Collection(insomniaCollection);\n    } else {\n      collection = parseInsomniaCollection(insomniaCollection);\n    }\n\n    const transformedCollection = transformItemsInCollection(collection);\n    const hydratedCollection = hydrateSeqInCollection(transformedCollection);\n    const validatedCollection = validateSchema(hydratedCollection);","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-converters/src/insomnia/insomnia-to-bruno.js#L281-L317","documentation":"Error \"An error occurred while parsing the Insomnia collection: ${err.message}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-converters/src/insomnia/insomnia-to-bruno.js:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the reported error and validate the Insomnia export JSON.","Re-export from Insomnia in the supported format and retry."],"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"}