From 2e62afe7eec5566671d2ab0c0b9d9155e01442ef Mon Sep 17 00:00:00 2001 From: Domino Valdano <2644901+reductionista@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:14:31 -0800 Subject: [PATCH] Fix slices.ContainsFunc --- pkg/types/provider.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/types/provider.go b/pkg/types/provider.go index dcc6fa77b..c2153ea49 100644 --- a/pkg/types/provider.go +++ b/pkg/types/provider.go @@ -1,6 +1,7 @@ package types import ( + "slices" "strings" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" @@ -76,7 +77,7 @@ func grpcErrorHasTypeAndMessage(target error, msg string, code codes.Code) bool } errs := strings.Split(s.Message(), ":") - return slices.ContainsFunc(errs, func(err error) bool { - return strings.Trim(err, " ") == msg - } + return slices.ContainsFunc(errs, func(err string) bool { + return strings.Trim(err, " ") == msg + }) }