Skip to content
Snippets Groups Projects

Add endpoint for apps which throw errors

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
+ 7
0
@@ -343,6 +343,7 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI
highestVer := 0
highsetVerNil := true
firstTime := make(map[int]*appInfo)
var firstErr error = nil
for {
info, err := s.parseAppToml(ctx, pathInRepo, obj)
if err == nil {
@@ -354,6 +355,9 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI
}
} else {
log.Printf("%s@%s: %v", repo, obj.Hash.String(), err)
if firstErr == nil {
firstErr = err
}
}
if len(obj.ParentHashes) == 0 {
break
@@ -365,6 +369,9 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI
}
if highsetVerNil {
if firstErr != nil {
return nil, firstErr
}
return nil, fmt.Errorf("no `version` field in `flow3r.toml`")
}
stars, err := s.getStars(ctx, repo)
Loading