{"record":{"id":"fd3d2512f76f04d9","repo":"Kong/insomnia","slug":"file-is-required","errorCode":null,"errorMessage":"File is required","messagePattern":"File is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/routes/import.scan.tsx","lineNumber":68,"sourceCode":"    const importYaml = mcpUrlToInsomniaV5Yaml(mcp);\n    invariant(importYaml, 'Failed to convert MCP URL to Insomnia v5 YAML');\n    contentList.push({\n      contentStr: importYaml,\n      oriFileName: 'mcp',\n    });\n  } else if (source === 'file') {\n    let filePaths: string[];\n    try {\n      filePaths = typeof data.filePaths === 'string' ? JSON.parse(data.filePaths) : data.filePaths;\n      if (!Array.isArray(filePaths)) {\n        throw new TypeError('filePaths is not an array');\n      }\n      filePaths = filePaths.filter(filePath => typeof filePath === 'string' && filePath);\n      if (filePaths.length === 0) {\n        throw new Error('filePaths is empty');\n      }\n    } catch {\n      throw new Error('File is required');\n    }\n\n    const zipFilePaths = filePaths.filter(isZipFilePath);\n    const nonZipFilePaths = filePaths.filter(filePath => !isZipFilePath(filePath));\n\n    // zip file is for postman data dump\n    for (const zipFilePath of zipFilePaths) {\n      const postmanDataDumpRawData = await getFilesFromPostmanExportedDataDump(zipFilePath);\n      const zipBaseName = window.path.basename(zipFilePath);\n\n      function trans({ contentStr, oriFileName }: ImportEntry): ImportEntry {\n        return {\n          contentStr,\n          oriFileName: `${oriFileName} in ${zipBaseName}`,\n        };\n      }\n\n      contentList.push(","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/routes/import.scan.tsx#L50-L86","documentation":"Error \"File is required\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/routes/import.scan.tsx:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}