From 59b6e374f0407fcb44e59b0c8189a2e82276972c Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Wed, 10 Jan 2024 17:59:16 +0100 Subject: [PATCH] Improve error message for unimplemented functions Signed-off-by: Christian Haudum --- pkg/logql/downstream.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/logql/downstream.go b/pkg/logql/downstream.go index 8e46b182ef59..76594dc040c2 100644 --- a/pkg/logql/downstream.go +++ b/pkg/logql/downstream.go @@ -285,11 +285,11 @@ func (ev DownstreamEvaluator) Downstream(ctx context.Context, queries []Downstre type errorQuerier struct{} func (errorQuerier) SelectLogs(_ context.Context, _ SelectLogParams) (iter.EntryIterator, error) { - return nil, errors.New("unimplemented SelectLogs") + return nil, errors.New("SelectLogs unimplemented: the query-frontend cannot evaluate an expression that selects logs. this is likely a bug in the query engine. please contact your system operator") } func (errorQuerier) SelectSamples(_ context.Context, _ SelectSampleParams) (iter.SampleIterator, error) { - return nil, errors.New("unimplemented SelectSamples") + return nil, errors.New("SelectSamples unimplemented: the query-frontend cannot evaluate an expression that selects samples. this is likely a bug in the query engine. please contact your system operator") } func NewDownstreamEvaluator(downstreamer Downstreamer) *DownstreamEvaluator {