From 7260aa0cd70195a4679ca3c94204d9e618f947f2 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 19 Oct 2022 16:51:48 +0200 Subject: Refactor: Make errors use the parent's error level - All wrapped errors have to be created with types.NewWrappedError to inherit the error level from the parent - Or types.NewWrappedErrorLevel can be used which means a custom error level is given. For example this is done with cancelling OAuth - Client public errors are forwarded with handleError that also logs it with the error's level --- internal/verify/verify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/verify/verify.go') diff --git a/internal/verify/verify.go b/internal/verify/verify.go index 43b6c74..2dd0472 100644 --- a/internal/verify/verify.go +++ b/internal/verify/verify.go @@ -39,7 +39,7 @@ func Verify( forcePrehash, ) if err != nil { - return valid, &types.WrappedErrorMessage{Message: "failed signature verify", Err: err} + return valid, types.NewWrappedError("failed signature verify", err) } return valid, nil } -- cgit v1.2.3