{"record":{"id":"48169543c1a936b6","repo":"microsoft/typescript-go","slug":"invalid-uri-s","errorCode":null,"errorMessage":"invalid URI: %s","messagePattern":"invalid URI: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lsp/lsproto/lsp.go","lineNumber":38,"sourceCode":"\tif bundled.IsBundled(string(uri)) {\n\t\treturn string(uri)\n\t}\n\tif strings.HasPrefix(string(uri), \"file://\") {\n\t\tparsed, err := url.Parse(string(uri))\n\t\tif err != nil {\n\t\t\tpanic(fmt.Sprintf(\"invalid file URI: %s\", uri))\n\t\t}\n\t\tif parsed.Host != \"\" {\n\t\t\treturn \"//\" + parsed.Host + parsed.Path\n\t\t}\n\t\treturn fixWindowsURIPath(parsed.Path)\n\t}\n\n\t// Leave all other URIs escaped so we can round-trip them.\n\n\tscheme, path, ok := strings.Cut(string(uri), \":\")\n\tif !ok {\n\t\tpanic(fmt.Sprintf(\"invalid URI: %s\", uri))\n\t}\n\n\tauthority := \"ts-nul-authority\"\n\tif rest, ok := strings.CutPrefix(path, \"//\"); ok {\n\t\tauthority, path, ok = strings.Cut(rest, \"/\")\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"invalid URI: %s\", uri))\n\t\t}\n\t}\n\n\treturn \"^/\" + scheme + \"/\" + authority + \"/\" + path\n}\n\nfunc (uri DocumentUri) Path(useCaseSensitiveFileNames bool) tspath.Path {\n\tfileName := uri.FileName()\n\treturn tspath.ToPath(fileName, \"\", useCaseSensitiveFileNames)\n}\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/internal/lsp/lsproto/lsp.go#L20-L56","documentation":"Error \"invalid URI: %s\" thrown in microsoft/typescript-go.","triggerScenarios":"Thrown at internal/lsp/lsproto/lsp.go:38 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":"1bcfa18d79a3be41772223d5c05dfe4480e614ff","analyzedAt":"2026-08-16T02:12:00.115Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}