{"record":{"id":"d003fcb94cd5cd3a","repo":"thanos-io/thanos","slug":"sending-exemplars-warning-to-server-v","errorCode":null,"errorMessage":"sending exemplars warning to server %v","messagePattern":"sending exemplars warning to server (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/exemplars/proxy.go","lineNumber":212,"sourceCode":"\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}\n}\n\n// matchesExternalLabels returns false if given matchers are not matching external labels.\n// If true, matchesExternalLabels also returns Prometheus matchers without those matching external labels.\nfunc matchesExternalLabels(ms []*labels.Matcher, externalLabels labels.Labels) (bool, []*labels.Matcher) {\n\tif externalLabels.IsEmpty() {\n\t\treturn true, ms\n\t}","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/exemplars/proxy.go#L194-L230","documentation":"The exemplars proxy received a warning from a store and tried to forward it as a warning response to the client, but stream.server.Send failed, so the downstream gRPC connection is unusable and the partial-response warning cannot be delivered.","triggerScenarios":"Thrown at pkg/exemplars/proxy.go:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat the stream as dead and return; the client is gone or the transport broke.","Log with the stream.server identifier for diagnosis.","No retry: per-request streaming cannot be resumed."],"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"}