diff options
author | Kévin Dunglas <[email protected]> | 2024-08-23 19:01:28 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-23 11:01:28 -0600 |
commit | 2028da4e74cd41f0f7f94222c6599da1a371d4b8 (patch) | |
tree | 9d29ec3f057d913a5daba11f98b42d80f9da3ed5 /modules | |
parent | 4ade967005929e98ae2265d9d7c89b33f1ca951b (diff) | |
download | caddy-2028da4e74cd41f0f7f94222c6599da1a371d4b8.tar.gz caddy-2028da4e74cd41f0f7f94222c6599da1a371d4b8.zip |
ci: build and test with Go 1.23 (#6526)
* chore: build and test with Go 1.23
* ci: bump golangci-lint to v1.60
* fix: make properly wrap errors
* ci: remove Go 1.21
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/celmatcher.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go index d4016478e..a5565eb98 100644 --- a/modules/caddyhttp/celmatcher.go +++ b/modules/caddyhttp/celmatcher.go @@ -340,7 +340,7 @@ func (celTypeAdapter) NativeToValue(value any) ref.Val { case time.Time: return types.Timestamp{Time: v} case error: - types.NewErr(v.Error()) + return types.WrapErr(v) } return types.DefaultTypeAdapter.NativeToValue(value) } @@ -499,7 +499,7 @@ func CELMatcherRuntimeFunction(funcName string, fac CELMatcherFactory) functions return func(celReq, matcherData ref.Val) ref.Val { matcher, err := fac(matcherData) if err != nil { - return types.NewErr(err.Error()) + return types.WrapErr(err) } httpReq := celReq.Value().(celHTTPRequest) return types.Bool(matcher.Match(httpReq.Request)) |