{"record":{"id":"7832019af97f0b1f","repo":"thanos-io/thanos","slug":"sending-exemplars-error-to-server-v","errorCode":null,"errorMessage":"sending exemplars error to server %v","messagePattern":"sending exemplars error to server (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/exemplars/proxy.go","lineNumber":204,"sourceCode":"\t\t// Not an error if response strategy is warning.\n\t\treturn nil\n\t}\n\n\tfor {\n\t\texemplar, err := exemplars.Recv()\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\n\t\tif err != nil {\n\t\t\terr = errors.Wrapf(err, \"receiving exemplars from exemplars client %v\", stream.client)\n\n\t\t\tif stream.request.PartialResponseStrategy == storepb.PartialResponseStrategy_ABORT {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err := stream.server.Send(exemplarspb.NewWarningExemplarsResponse(err)); err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"sending exemplars error to server %v\", stream.server)\n\t\t\t}\n\t\t\t// Not an error if response strategy is warning.\n\t\t\treturn nil\n\t\t}\n\n\t\tif w := exemplar.GetWarning(); w != \"\" {\n\t\t\tif err := stream.server.Send(exemplarspb.NewWarningExemplarsResponse(errors.New(w))); err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"sending exemplars warning to server %v\", stream.server)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tselect {\n\t\tcase stream.channel <- exemplar.GetData():\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\t}\n\t}","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/exemplars/proxy.go#L186-L222","documentation":"In the exemplars proxy receive loop, forwarding a warning response (created after a receive error from the exemplars client) back on the gRPC server stream failed, meaning the querying client connection is broken.","triggerScenarios":"Thrown at pkg/exemplars/proxy.go:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the client stream state; the caller likely disconnected.","Log and drop the response; the request is already failing.","Verify gRPC server Send machinery is healthy."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}