{"record":{"id":"db900c66a319cc51","repo":"decolua/9router","slug":"unsupported-format","errorCode":null,"errorMessage":"Unsupported format","messagePattern":"Unsupported format","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/proxy-pools/page.js","lineNumber":478,"sourceCode":"      };\n    }\n\n    const parts = trimmed.split(\":\");\n    if (parts.length === 4) {\n      const [host, port, username, password] = parts;\n      if (!host || !port || !username || !password) {\n        throw new Error(\"Invalid host:port:user:pass format\");\n      }\n\n      const proxyUrl = `http://${encodeURIComponent(username)}:${encodeURIComponent(password)}@${host}:${port}`;\n      const parsed = new URL(proxyUrl);\n      return {\n        proxyUrl: parsed.toString(),\n        name: `Imported ${host}:${port}`,\n      };\n    }\n\n    throw new Error(\"Unsupported format\");\n  };\n\n  const handleBatchImport = async () => {\n    const lines = batchImportText\n      .split(/\\r?\\n/)\n      .map((line) => line.trim())\n      .filter(Boolean);\n\n    if (lines.length === 0) {\n      notify.warning(\"Please paste at least one proxy line.\");\n      return;\n    }\n\n    const parsedEntries = [];\n    const invalidLines = [];\n\n    lines.forEach((line, index) => {\n      try {","sourceCodeStart":460,"sourceCodeEnd":496,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/src/app/(dashboard)/dashboard/proxy-pools/page.js#L460-L496","documentation":"ProxyPoolsPage's line parser throws this when a trimmed import line splits into something other than 4 or 5 (URL form handled above the shown region) colon-separated parts — i.e. the line matches no supported proxy notation. It is the final fallthrough of parseProxyLine.","triggerScenarios":"Lines with fewer than 4 segments (`host:port`), more than 5 (`host:port:user:pass:extra`), or non-URL notations like `host port user pass` (spaces not colons).","commonSituations":"Pasting a bare host:port without credentials; proxy lists using space or comma separators; lines with protocol prefixes plus credentials producing unexpected segment counts; stray whitespace/comments in the batch textarea.","solutions":["Format each line as host:port:user:pass (or a full proxy URL form the parser accepts)","Convert space/comma-separated proxy lists to colon-separated before importing","Remove blank lines and comment lines from the batch input","Pre-validate lines in the UI and skip invalid ones with a reported error list instead of aborting"],"exampleFix":"// before\nthrow new Error(\"Unsupported format\");\n// after\nthrow new Error(`Unsupported format on line: \"${trimmed}\" — expected host:port:user:pass or a proxy URL`);","handlingStrategy":"validation","validationCode":"// pre-validate accepted notations\nconst ok = /^[^:\\s]+:\\d+:[^:]+:[^:]+$/.test(line) || /^https?:\\/\\//.test(line);\nif (!ok) throw new Error(`Unsupported format: \"${line}\"`);","typeGuard":null,"tryCatchPattern":"try {\n  const proxy = parseProxyLine(line);\n  results.push(proxy);\n} catch (err) {\n  lineErrors.push(`Line ${i + 1}: ${err.message}`);\n  continue;\n}","preventionTips":["Use host:port:user:pass or a full proxy URL per line — nothing else","Convert space/comma-separated lists to the colon format first","Delete blank and comment lines from the batch textarea","Report the offending line text in the error message"],"tags":["validation","proxy","parsing","batch-import"],"backgroundTag":"invalid-proxy-format","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}