microsoft/typescript-go · error
%w: parse error: %w
Error message
%w: parse error: %w
What it means
Error "%w: parse error: %w" thrown in microsoft/typescript-go.
Source
Thrown at internal/jsonrpc/baseproto.go:58
if errors.Is(err, io.EOF) {
return nil, io.EOF
}
return nil, fmt.Errorf("jsonrpc: read header: %w", err)
}
if bytes.Equal(line, []byte("\r\n")) {
break
}
key, value, ok := bytes.Cut(line, []byte(":"))
if !ok {
return nil, fmt.Errorf("%w: %q", ErrInvalidHeader, line)
}
if bytes.Equal(key, []byte("Content-Length")) {
contentLength, err = strconv.ParseInt(string(bytes.TrimSpace(value)), 10, 64)
if err != nil {
return nil, fmt.Errorf("%w: parse error: %w", ErrInvalidContentLength, err)
}
if contentLength < 0 {
return nil, fmt.Errorf("%w: negative value %d", ErrInvalidContentLength, contentLength)
}
}
}
if contentLength <= 0 {
return nil, ErrNoContentLength
}
data := make([]byte, contentLength)
if _, err := io.ReadFull(r.r, data); err != nil {
return nil, fmt.Errorf("jsonrpc: read content: %w", err)
}
return data, nil
}View on GitHub (pinned to 1bcfa18d79)
When it happens
Trigger: Thrown at internal/jsonrpc/baseproto.go:58 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of microsoft/typescript-go@1bcfa18d79 (2026-08-16).
Data as JSON: /api/errors/73498556f280ce51.
Report an issue: GitHub.