Skip to content

Commit

Permalink
fix(gcs): throw argo not found error if key not exist (argoproj#6393)
Browse files Browse the repository at this point in the history
Signed-off-by: AntoineDao <antoinedao1@gmail.com>
Signed-off-by: uturunku1 <luces.huayhuaca@gmail.com>
  • Loading branch information
AntoineDao authored and uturunku1 committed Jul 22, 2021
1 parent 69da342 commit 58cd76f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions workflow/artifacts/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func downloadObjects(client *storage.Client, bucket, key, path string) error {
if err != nil {
return err
}
if len(objNames) < 1 {
msg := fmt.Sprintf("no results for key: %s", key)
return errors.New(errors.CodeNotFound, msg)
}
for _, objName := range objNames {
err = downloadObject(client, bucket, key, objName, path)
if err != nil {
Expand Down

0 comments on commit 58cd76f

Please sign in to comment.