From c48799c2a45cee660da408ec75fac1b801c263b9 Mon Sep 17 00:00:00 2001 From: stefan Date: Tue, 22 Feb 2022 18:03:01 +0100 Subject: [PATCH] unify sender name for error messages in pongo2 filters --- pkg/template/template_filters.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/template/template_filters.go b/pkg/template/template_filters.go index b8d5305..e06f8c4 100644 --- a/pkg/template/template_filters.go +++ b/pkg/template/template_filters.go @@ -83,7 +83,7 @@ func pongoJSFilter(name string, js string) func(in *pongo2.Value, param *pongo2. v, err := vm.RunString(js) if err != nil { return nil, &pongo2.Error{ - Sender: "javascript-filter@" + name, + Sender: "javascript-filter:" + name, OrigError: err, } } @@ -135,7 +135,7 @@ func filterToJSON(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *pongo2 b, err := json.Marshal(in.Interface()) if err != nil { return nil, &pongo2.Error{ - Sender: "filterToJSON", + Sender: "filter:filterToJSON", OrigError: err, } } @@ -226,7 +226,7 @@ func filterUnmarshalYAML(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, var ret interface{} if err := gyml.Unmarshal([]byte(in.String()), &ret); err != nil { return nil, &pongo2.Error{ - Sender: "filterUnmarshalYAML", + Sender: "filter:filterUnmarshalYAML", OrigError: err, } }