{"record":{"id":"00143521568a558a","repo":"microsoft/typescript-go","slug":"invalid-file-uri-s","errorCode":null,"errorMessage":"invalid file URI: %s","messagePattern":"invalid file URI: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lsp/lsproto/lsp.go","lineNumber":26,"sourceCode":"\t\"strings\"\n\n\t\"github.com/microsoft/typescript-go/internal/bundled\"\n\t\"github.com/microsoft/typescript-go/internal/json\"\n\n\t\"github.com/microsoft/typescript-go/internal/jsonrpc\"\n\t\"github.com/microsoft/typescript-go/internal/tspath\"\n)\n\ntype DocumentUri string // !!!\n\nfunc (uri DocumentUri) FileName() string {\n\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 {","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/internal/lsp/lsproto/lsp.go#L8-L44","documentation":"Error \"invalid file URI: %s\" thrown in microsoft/typescript-go.","triggerScenarios":"Thrown at internal/lsp/lsproto/lsp.go:26 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"}