Wrap errors when fail to fetch repo or gist (#4259)

This commit is contained in:
Kashif Khan
2025-06-24 19:34:43 +05:00
committed by GitHub
parent bb47e8f432
commit b4e1b59a6f
+2 -2
View File
@@ -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