From 42f7e4f4fb41555d8c4f39ca6cdb35ed5d45b2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Tue, 30 Jul 2024 14:30:03 +0200 Subject: [PATCH] chore: improve field not found message (#439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- pkg/engine/assert/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/engine/assert/parse.go b/pkg/engine/assert/parse.go index 7e1a0c27..8d71286e 100644 --- a/pkg/engine/assert/parse.go +++ b/pkg/engine/assert/parse.go @@ -52,7 +52,7 @@ func (n mapNode) assert(ctx context.Context, path *field.Path, value any, bindin if err != nil { return nil, field.InternalError(path.Child(fmt.Sprint(k)), err) } else if projection == nil { - errs = append(errs, field.Required(path.Child(fmt.Sprint(k)), "projection is not valid")) + errs = append(errs, field.Required(path.Child(fmt.Sprint(k)), "field not found in the input object")) } else { if projection.binding != "" { bindings = bindings.Register("$"+projection.binding, jpbinding.NewBinding(projection.result))