Skip to content

Commit

Permalink
chore: updated error message to include context (argoproj#11066)
Browse files Browse the repository at this point in the history
Signed-off-by: Prasad Pandeti <prasad_pandeti@intuit.com>
Co-authored-by: Prasad Pandeti <prasad_pandeti@intuit.com>
  • Loading branch information
2 people authored and xiaowu.zhu committed Aug 9, 2023
1 parent ad22807 commit b2c4ca2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reposerver/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func AddCacheFlagsToCmd(cmd *cobra.Command, opts ...func(client *redis.Client))
return func() (*Cache, error) {
cache, err := repoFactory()
if err != nil {
return nil, err
return nil, fmt.Errorf("error adding cache flags to cmd: %w", err)
}
return NewCache(cache, repoCacheExpiration, revisionCacheExpiration), nil
}
Expand Down
2 changes: 1 addition & 1 deletion reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (s *Service) Init() error {
func (s *Service) ListRefs(ctx context.Context, q *apiclient.ListRefsRequest) (*apiclient.Refs, error) {
gitClient, err := s.newClient(q.Repo)
if err != nil {
return nil, err
return nil, fmt.Errorf("error creating git client: %w", err)
}

s.metricsServer.IncPendingRepoRequest(q.Repo.Repo)
Expand Down

0 comments on commit b2c4ca2

Please sign in to comment.