From 516f570ea6a5bc3fa246f632063c0c666b17b3ab Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Mon, 13 May 2024 21:04:43 +0100 Subject: [PATCH] fix(storage/fs): return empty slice instead of rule not found --- internal/storage/fs/snapshot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/storage/fs/snapshot.go b/internal/storage/fs/snapshot.go index 578fbbe2a3..43570229d0 100644 --- a/internal/storage/fs/snapshot.go +++ b/internal/storage/fs/snapshot.go @@ -717,7 +717,7 @@ func (ss *Snapshot) GetEvaluationRules(ctx context.Context, flag storage.Resourc func (ss *Snapshot) GetEvaluationDistributions(ctx context.Context, rule storage.IDRequest) ([]*storage.EvaluationDistribution, error) { dists, ok := ss.evalDists[rule.ID] if !ok { - return nil, errs.ErrNotFoundf("rule %q", rule.ID) + return []*storage.EvaluationDistribution{}, nil } return dists, nil