From 6ad70f7b94fea1daf0bdd9e49ee69c0b4c0a5088 Mon Sep 17 00:00:00 2001 From: Sylwester Piskozub Date: Tue, 3 Feb 2026 15:22:31 +0100 Subject: [PATCH] improve error message Signed-off-by: Sylwester Piskozub --- app/controlplane/pkg/data/referrer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controlplane/pkg/data/referrer.go b/app/controlplane/pkg/data/referrer.go index 4565e006b..d9d72ea44 100644 --- a/app/controlplane/pkg/data/referrer.go +++ b/app/controlplane/pkg/data/referrer.go @@ -1,5 +1,5 @@ // -// Copyright 2023 The Chainloop Authors. +// Copyright 2023-2026 The Chainloop Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -89,10 +89,10 @@ func (r *ReferrerRepo) Save(ctx context.Context, referrers []*biz.Referrer, work // Iterate on the items it refer to (references) var references []uuid.UUID for _, ref := range parentRef.References { - // amd find it in the DB + // and find it in the DB storedReference, ok := storedMap[ref.MapID()] if !ok { - return fmt.Errorf("referrer %v not found", ref) + return fmt.Errorf("an artifact or piece of evidence with digest %s (kind: %s) can't be found", ref.Digest, ref.Kind) } references = append(references, storedReference)