From e0801f5a5da589118d1e331db3cbd68edeb80486 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 25 Jun 2025 11:28:17 +0200 Subject: [PATCH] discovery: use errors.Is for error check Ensure that the check works for wrapped errors. Otherwise, this breaks for a SQLStore graph backend which wraps the error it returns. --- discovery/bootstrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/bootstrapper.go b/discovery/bootstrapper.go index 1a0f99735..6263db3f7 100644 --- a/discovery/bootstrapper.go +++ b/discovery/bootstrapper.go @@ -236,7 +236,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context, return errFound }) - if err != nil && err != errFound { + if err != nil && !errors.Is(err, errFound) { return nil, err }