mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
This commit is contained in:
parent
7f84f7d541
commit
f491540636
1 changed files with 14 additions and 2 deletions
|
|
@ -62,7 +62,13 @@ func (s *Server) ListApps(ctx context.Context, q *RepoAppsQuery) (*RepoAppsRespo
|
|||
}
|
||||
repo, err := s.db.GetRepository(ctx, q.Repo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound {
|
||||
repo = &appsv1.Repository{
|
||||
Repo: q.Repo,
|
||||
}
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Test the repo
|
||||
|
|
@ -115,7 +121,13 @@ func (s *Server) GetAppDetails(ctx context.Context, q *RepoAppDetailsQuery) (*Re
|
|||
}
|
||||
repo, err := s.db.GetRepository(ctx, q.Repo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound {
|
||||
repo = &appsv1.Repository{
|
||||
Repo: q.Repo,
|
||||
}
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Test the repo
|
||||
|
|
|
|||
Loading…
Reference in a new issue