{"record":{"id":"0aeb992d1e5551d5","repo":"microsoft/typescript-go","slug":"32600","errorCode":"-32600","errorMessage":"%w: %w","messagePattern":"%w: %w","errorType":"error_code","errorClass":"ErrorCode","httpStatus":null,"severity":"error","filePath":"internal/lsp/lsproto/jsonrpc.go","lineNumber":44,"sourceCode":"}\n\nfunc (m *Message) AsResponse() *ResponseMessage {\n\treturn m.msg.(*ResponseMessage)\n}\n\nfunc (m *Message) UnmarshalJSON(data []byte) error {\n\tvar raw struct {\n\t\tJSONRPC jsonrpc.JSONRPCVersion `json:\"jsonrpc\"`\n\t\tMethod  Method                 `json:\"method\"`\n\t\tID      *jsonrpc.ID            `json:\"id,omitzero\"`\n\t\tParams  json.Value             `json:\"params\"`\n\t\t// We don't have a method in the response, so we have no idea what to decode.\n\t\t// Store the raw text and let the caller decode it.\n\t\tResult json.Value             `json:\"result,omitzero\"`\n\t\tError  *jsonrpc.ResponseError `json:\"error,omitzero\"`\n\t}\n\tif err := json.Unmarshal(data, &raw); err != nil {\n\t\treturn fmt.Errorf(\"%w: %w\", ErrorCodeInvalidRequest, err)\n\t}\n\tif raw.ID != nil && raw.Method == \"\" {\n\t\tm.Kind = jsonrpc.MessageKindResponse\n\t\tm.msg = &ResponseMessage{\n\t\t\tID:     raw.ID,\n\t\t\tResult: raw.Result,\n\t\t\tError:  raw.Error,\n\t\t}\n\t\treturn nil\n\t}\n\n\tvar params any\n\tif len(raw.Params) > 0 {\n\t\tparams = raw.Params\n\t}\n\n\tif raw.ID == nil {\n\t\tm.Kind = jsonrpc.MessageKindNotification","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/internal/lsp/lsproto/jsonrpc.go#L26-L62","documentation":"Error \"%w: %w\" thrown in microsoft/typescript-go.","triggerScenarios":"Thrown at internal/lsp/lsproto/jsonrpc.go:44 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"}