{"record":{"id":"38c4bac47d6e1431","repo":"googleapis/mcp-toolbox","slug":"error-building-req-for-endpoint-v-v","errorCode":null,"errorMessage":"error building req for endpoint [%v] :%v","messagePattern":"error building req for endpoint \\[(.+?)\\] :(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/dgraph/dgraph.go","lineNumber":205,"sourceCode":"\turl, err := getUrl(hc.baseUrl, \"/query\", urlParams)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tp := struct {\n\t\tQuery     string                 `json:\"query\"`\n\t\tVariables map[string]interface{} `json:\"variables\"`\n\t}{\n\t\tQuery:     query,\n\t\tVariables: paramsMap,\n\t}\n\tbody, err := json.Marshal(p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error marshlling json: %v\", err)\n\t}\n\n\treq, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(body))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building req for endpoint [%v] :%v\", url, err)\n\t}\n\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\treturn hc.doReq(req)\n}\n\n// mutate sends an RDF mutation to the Dgraph server with \"commitNow: true\", embedding parameters.\n// Returns the server's response as a byte slice or an error if the mutation fails.\nfunc (hc *DgraphClient) mutate(mutation string, paramsMap map[string]interface{}) ([]byte, error) {\n\tmu := embedParamsIntoMutation(mutation, paramsMap)\n\tparams := url.Values{}\n\tparams.Add(\"commitNow\", \"true\")\n\turl, err := getUrl(hc.baseUrl, \"/mutate\", params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq, err := http.NewRequest(http.MethodPost, url, bytes.NewBufferString(mu))","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/dgraph/dgraph.go#L187-L223","documentation":"Error \"error building req for endpoint [%v] :%v\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/dgraph/dgraph.go:205 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":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}