{"record":{"id":"ab127bcb780e28b3","repo":"googleapis/mcp-toolbox","slug":"got-non-200-resp-v","errorCode":null,"errorMessage":"got non 200 resp: %v","messagePattern":"got non 200 resp: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/dgraph/dgraph.go","lineNumber":265,"sourceCode":"\t\t\treturn nil, errLogin\n\t\t}\n\t\tif hc.HttpToken != nil {\n\t\t\treq.Header.Add(\"X-Dgraph-AccessToken\", hc.AccessJwt)\n\t\t}\n\t\tresp, err = hc.httpClient.Do(req)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tdefer resp.Body.Close()\n\n\trespBody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading response body: url: [%v], err: [%v]\", req.URL, err)\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"got non 200 resp: %v\", string(respBody))\n\t}\n\n\treturn respBody, nil\n}\n\nfunc (hc *DgraphClient) loginWithCredentials() error {\n\tcredentials := map[string]interface{}{\n\t\t\"userid\":    hc.UserId,\n\t\t\"password\":  hc.Password,\n\t\t\"namespace\": hc.Namespace,\n\t}\n\treturn hc.doLogin(credentials)\n}\n\nfunc (hc *DgraphClient) loginWithToken() error {\n\tcredentials := map[string]interface{}{\n\t\t\"refreshJWT\": hc.RefreshToken,\n\t\t\"namespace\":  hc.Namespace,","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/dgraph/dgraph.go#L247-L283","documentation":"Error \"got non 200 resp: %v\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/dgraph/dgraph.go:265 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"}