{"record":{"id":"8429ce0c3eae2f49","repo":"microsoft/typescript-go","slug":"w-invalid-node-handle-q","errorCode":null,"errorMessage":"%w: invalid node handle %q","messagePattern":"%w: invalid node handle %q","errorType":"validation","errorClass":"ErrClientError","httpStatus":null,"severity":"error","filePath":"internal/api/session.go","lineNumber":3277,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer setup.done()\n\n\tt, err := setup.sd.resolveTypeHandle(params.Project, params.Type)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn setup.sd.newTypeResponse(params.Project, setup.checker.GetFalseTypeOfConditionalType(t)), nil\n}\n\nfunc (sd *snapshotData) resolveNodeHandle(program *compiler.Program, handle NodeHandle) (*ast.Node, error) {\n\ts := string(handle)\n\t// Format: \"index.kind.path\" — we need index and path, kind is informational only.\n\tfirstDot := strings.IndexByte(s, '.')\n\tif firstDot == -1 {\n\t\treturn nil, fmt.Errorf(\"%w: invalid node handle %q\", ErrClientError, handle)\n\t}\n\tsecondDot := strings.IndexByte(s[firstDot+1:], '.')\n\tif secondDot == -1 {\n\t\treturn nil, fmt.Errorf(\"%w: invalid node handle %q\", ErrClientError, handle)\n\t}\n\tsecondDot += firstDot + 1 // adjust to absolute index\n\n\tidx, err := strconv.ParseUint(s[:firstDot], 10, 32)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w: invalid node handle %q: %w\", ErrClientError, handle, err)\n\t}\n\tpath := tspath.Path(s[secondDot+1:])\n\n\tsourceFile := program.GetSourceFileByPath(path)\n\tif sourceFile == nil {\n\t\treturn nil, fmt.Errorf(\"%w: node handle %q could not be resolved (file may not be loaded or handle may be stale)\", ErrClientError, handle)\n\t}\n\ttable := encoder.GetNodeIndexTable(sourceFile)","sourceCodeStart":3259,"sourceCodeEnd":3295,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/internal/api/session.go#L3259-L3295","documentation":"Error \"%w: invalid node handle %q\" thrown in microsoft/typescript-go.","triggerScenarios":"Thrown at internal/api/session.go:3277 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"}