Skip to content

Commit

Permalink
Merge pull request #405 from reubenmiller/fix-return-upload-error
Browse files Browse the repository at this point in the history
fix(c8y microservices create): stop execution on binary upload errors
  • Loading branch information
reubenmiller authored Sep 20, 2024
2 parents 3ee67dd + fbfc886 commit 68cec1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,7 @@ func (n *CmdCreateHostedApplication) RunE(cmd *cobra.Command, args []string) err
n.factory.IOStreams.WaitForProgressIndicator()

if err != nil {
// handle error
n.SubCommand.GetCommand().PrintErrf("failed to upload file. %s", err)
return fmt.Errorf("failed to upload file. path=%s, err=%s", zipfile, err)
} else {
applicationBinaryID = resp.JSON("id").String()
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/microservices/create/create.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ func (n *CmdCreate) RunE(cmd *cobra.Command, args []string) error {
n.factory.IOStreams.WaitForProgressIndicator()

if err != nil {
// handle error
n.SubCommand.GetCommand().PrintErrf("failed to upload file. %s", err)
return fmt.Errorf("failed to upload file. path=%s, err=%s", n.file, err)
}
}
} else {
Expand Down

0 comments on commit 68cec1b

Please sign in to comment.