From e373dcf1c0f6942547b8dab2dc16748444da739c Mon Sep 17 00:00:00 2001 From: sh-cha Date: Tue, 10 Dec 2024 16:58:30 +0900 Subject: [PATCH] error wrapping --- challenger/challenger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenger/challenger.go b/challenger/challenger.go index 92724ee..31b0405 100644 --- a/challenger/challenger.go +++ b/challenger/challenger.go @@ -133,12 +133,12 @@ func (c *Challenger) Initialize(ctx types.Context) error { c.pendingChallenges, err = challengerdb.LoadPendingChallenges(c.db) if err != nil { - return err + return errors.Wrap(err, "failed to load pending challenges") } c.latestChallenges, err = challengerdb.LoadChallenges(c.db) if err != nil { - return err + return errors.Wrap(err, "failed to load challenges") } return nil