Skip to content

Commit

Permalink
Fix error handling in log client (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: oluwole fadeyi <[email protected]>
  • Loading branch information
tfadeyi authored Aug 3, 2023
1 parent f422c49 commit ba4aad0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/client/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ func (l *logClient) List(ctx context.Context, args ...interface{}) (interface{},
return nil, ErrAPIRateLimitReached
case err != nil:
return nil, err
case len(logs) == 0:
return nil, errors.New("no checkpoint log was found")
case len(logs) > 0:
checkpoint = logs[0]
}
checkpoint = logs[0]
}

for {
Expand Down

0 comments on commit ba4aad0

Please sign in to comment.