{"record":{"id":"657e4a0381b7e6ef","repo":"garrytan/gstack","slug":"usage-network-export-path","errorCode":null,"errorMessage":"Usage: network --export <path>","messagePattern":"Usage: network --export <path>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/read-commands.ts","lineNumber":424,"sourceCode":"        }\n\n        // Start capture\n        if (isCaptureActive()) return 'Capture already active. Use --capture stop first.';\n        const filterIdx = args.indexOf('--filter');\n        const filterPattern = filterIdx >= 0 ? args[filterIdx + 1] : undefined;\n        const info = startCapture(filterPattern);\n        // Attach listener to current page\n        const page = bm.getPage();\n        const listener = getCaptureListener();\n        if (listener) page.on('response', listener);\n        return `Network capture started${info.filter ? ` (filter: ${info.filter})` : ''}. Use --capture stop to stop.`;\n      }\n\n      if (args[0] === '--export') {\n        const { exportCapture } = await import('./network-capture');\n        const { validateOutputPath: vop } = await import('./path-security');\n        const exportPath = args[1];\n        if (!exportPath) throw new Error('Usage: network --export <path>');\n        vop(exportPath);\n        const count = exportCapture(exportPath);\n        return `Exported ${count} captured responses to ${exportPath}`;\n      }\n\n      if (args[0] === '--bodies') {\n        const { getCaptureBuffer } = await import('./network-capture');\n        return getCaptureBuffer().summary();\n      }\n\n      // Default: show request metadata\n      if (networkBuffer.length === 0) return '(no network requests)';\n      return networkBuffer.toArray().map(e =>\n        `${e.method} ${e.url} → ${e.status || 'pending'} (${e.duration || '?'}ms, ${e.size || '?'}B)`\n      ).join('\\n');\n    }\n\n    case 'dialog': {","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/read-commands.ts#L406-L442","documentation":"Error \"Usage: network --export <path>\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/read-commands.ts:424 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":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}