{"record":{"id":"eac78b134cbffb74","repo":"googleapis/mcp-toolbox","slug":"could-not-read-response-w","errorCode":null,"errorMessage":"could not read response: %w","messagePattern":"could not read response: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/cloudhealthcare/cloud_healthcare.go","lineNumber":279,"sourceCode":"\treturn ok\n}\n\nfunc (s *Source) IsDICOMStoreAllowed(storeID string) bool {\n\tif len(s.allowedDICOMStores) == 0 {\n\t\treturn true\n\t}\n\t_, ok := s.allowedDICOMStores[storeID]\n\treturn ok\n}\n\nfunc (s *Source) UseClientAuthorization() bool {\n\treturn s.UseClientOAuth\n}\n\nfunc parseResults(resp *http.Response) (any, error) {\n\trespBytes, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not read response: %w\", err)\n\t}\n\tif resp.StatusCode > 299 {\n\t\treturn nil, fmt.Errorf(\"status %d %s: %s\", resp.StatusCode, resp.Status, respBytes)\n\t}\n\tvar jsonMap map[string]interface{}\n\tif err := json.Unmarshal(respBytes, &jsonMap); err != nil {\n\t\treturn nil, fmt.Errorf(\"could not unmarshal response as json: %w\", err)\n\t}\n\treturn jsonMap, nil\n}\n\nfunc (s *Source) getService(tokenStr string) (*healthcare.Service, error) {\n\tsvc := s.Service()\n\tvar err error\n\t// Initialize new service if using user OAuth token\n\tif s.UseClientAuthorization() {\n\t\tsvc, err = s.ServiceCreator()(tokenStr)\n\t\tif err != nil {","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/cloudhealthcare/cloud_healthcare.go#L261-L297","documentation":"Error \"could not read response: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/cloudhealthcare/cloud_healthcare.go:279 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"}