Skip to content

Commit

Permalink
fix config aggregator validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreZiviani committed Mar 15, 2022
1 parent 4fb335e commit f134820
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func Config(ctx context.Context, p *ConfigCommand, subservice string) ([]string,
if err == nil {
// We have valid cached credentials
_ = json.Unmarshal([]byte(j), &aggregators)
if len(aggregators) == 0 {
c.Delete(cacheKey)
return nil, errors.New("could not find any aggregators")
}
} else {
// Searching for available aggregators
spanGetAggregators, tmpctx := opentracing.StartSpanFromContext(ctx, "configgetaggregators")
Expand Down

0 comments on commit f134820

Please sign in to comment.