googleapis/mcp-toolbox · error
error reading response body: url: [%v], err: [%v]
Error message
error reading response body: url: [%v], err: [%v]
What it means
Error "error reading response body: url: [%v], err: [%v]" thrown in googleapis/mcp-toolbox.
Source
Thrown at internal/sources/dgraph/dgraph.go:262
return nil, fmt.Errorf("error performing HTTP request: %w", err)
} else if err != nil && strings.Contains(err.Error(), "Token is expired") {
if errLogin := hc.loginWithToken(); errLogin != nil {
return nil, errLogin
}
if hc.HttpToken != nil {
req.Header.Add("X-Dgraph-AccessToken", hc.AccessJwt)
}
resp, err = hc.httpClient.Do(req)
if err != nil {
return nil, err
}
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: url: [%v], err: [%v]", req.URL, err)
}
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("got non 200 resp: %v", string(respBody))
}
return respBody, nil
}
func (hc *DgraphClient) loginWithCredentials() error {
credentials := map[string]interface{}{
"userid": hc.UserId,
"password": hc.Password,
"namespace": hc.Namespace,
}
return hc.doLogin(credentials)
}
func (hc *DgraphClient) loginWithToken() error {View on GitHub (pinned to 8cc6e09de2)
When it happens
Trigger: Thrown at internal/sources/dgraph/dgraph.go:262 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/f8dd9cdf3a7a375b.
Report an issue: GitHub.