{"record":{"id":"1c46fdc18f6548f7","repo":"thanos-io/thanos","slug":"fetching-rules-from-rules-client-v","errorCode":null,"errorMessage":"fetching rules from rules client %v","messagePattern":"fetching rules from rules client (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rules/proxy.go","lineNumber":106,"sourceCode":"type rulesStream struct {\n\tclient  rulespb.RulesClient\n\trequest *rulespb.RulesRequest\n\tchannel chan<- *rulespb.RuleGroup\n\tserver  rulespb.Rules_RulesServer\n}\n\nfunc (stream *rulesStream) receive(ctx context.Context) error {\n\tvar (\n\t\terr   error\n\t\trules rulespb.Rules_RulesClient\n\t)\n\n\ttracing.DoInSpan(ctx, \"receive_stream_request\", func(ctx context.Context) {\n\t\trules, err = stream.client.Rules(ctx, stream.request)\n\t})\n\n\tif err != nil {\n\t\terr = errors.Wrapf(err, \"fetching rules from rules client %v\", stream.client)\n\n\t\tif stream.request.PartialResponseStrategy == storepb.PartialResponseStrategy_ABORT {\n\t\t\treturn err\n\t\t}\n\n\t\tif serr := stream.server.Send(rulespb.NewWarningRulesResponse(err)); serr != nil {\n\t\t\treturn serr\n\t\t}\n\t\t// Not an error if response strategy is warning.\n\t\treturn nil\n\t}\n\n\tfor {\n\t\trule, err := rules.Recv()\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/rules/proxy.go#L88-L124","documentation":"Raised in rulesStream.receive when the initial stream.client.Rules RPC call to the underlying rules store fails — connection errors, unavailability, or the store rejecting the request. The error is wrapped with the client identity; if the request strategy is ABORT it propagates as an error, otherwise it is degraded to a warning response.","triggerScenarios":"Thrown at pkg/rules/proxy.go:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the rules store/gRPC endpoint is reachable and healthy","Check store logs for why the Rules RPC was rejected","For ABO (abort) strategy callers, treat as fatal; for warnings, the client receives a warning response instead"],"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"}