From b4e1b59a6f9a1ec532f0bfe88afce8fd0f48e9ba Mon Sep 17 00:00:00 2001 From: Kashif Khan <70996046+kashifkhan0771@users.noreply.github.com> Date: Tue, 24 Jun 2025 19:34:43 +0500 Subject: [PATCH] Wrap errors when fail to fetch repo or gist (#4259) --- pkg/sources/github/github.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.go index 6a2ae00c2..e45722d8f 100644 --- a/pkg/sources/github/github.go +++ b/pkg/sources/github/github.go @@ -474,7 +474,7 @@ func (s *Source) ensureRepoInfoCache(ctx context.Context, repo string, reporter } if err != nil { - return repo, fmt.Errorf("failed to fetch gist") + return repo, fmt.Errorf("failed to fetch gist: %w", err) } s.cacheGistInfo(gist) @@ -488,7 +488,7 @@ func (s *Source) ensureRepoInfoCache(ctx context.Context, repo string, reporter continue } if err != nil { - return repo, fmt.Errorf("failed to fetch repository") + return repo, fmt.Errorf("failed to fetch repository: %w", err) } s.cacheRepoInfo(ghRepo) break