{"record":{"id":"ae12ef815b0bda42","repo":"clash-verge-rev/clash-verge-rev","slug":"invalid-hysteria2-uri","errorCode":null,"errorMessage":"Invalid hysteria2 uri","messagePattern":"Invalid hysteria2 uri","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/utils/uri-parser/hysteria2.ts","lineNumber":18,"sourceCode":"import {\n  decodeAndTrim,\n  parseBoolOrPresence,\n  parsePortOrDefault,\n  parseQueryStringNormalized,\n  parseUrlLike,\n  safeDecodeURIComponent,\n  stripUriScheme,\n} from './helpers'\n\nexport function URI_Hysteria2(line: string): IProxyHysteria2Config {\n  const afterScheme = stripUriScheme(\n    line,\n    ['hysteria2', 'hy2'],\n    'Invalid hysteria2 uri',\n  )\n  if (!afterScheme) {\n    throw new Error('Invalid hysteria2 uri')\n  }\n  const {\n    auth: passwordRaw,\n    host: server,\n    port,\n    query: addons,\n    fragment: nameRaw,\n  } = parseUrlLike(afterScheme, {\n    requireAuth: true,\n    errorMessage: 'Invalid hysteria2 uri',\n  })\n  const portNum = parsePortOrDefault(port, 443)\n  const password = safeDecodeURIComponent(passwordRaw) ?? passwordRaw\n\n  const decodedName = decodeAndTrim(nameRaw)\n\n  const name = decodedName ?? `Hysteria2 ${server}:${portNum}`\n","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/clash-verge-rev/clash-verge-rev/blob/5cad0f2799e74b1105e133bcfc2a45f5c1370ef1/src/utils/uri-parser/hysteria2.ts#L1-L36","documentation":"Error \"Invalid hysteria2 uri\" thrown in clash-verge-rev/clash-verge-rev.","triggerScenarios":"Thrown at src/utils/uri-parser/hysteria2.ts:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5cad0f2799e74b1105e133bcfc2a45f5c1370ef1","analyzedAt":"2026-08-12T03:25:57.699Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}