diff --git a/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go b/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go index 8752cded1..b64149353 100644 --- a/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go +++ b/pkg/cmd/applications/createhostedapplication/createHostedApplication.manual.go @@ -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() } diff --git a/pkg/cmd/microservices/create/create.manual.go b/pkg/cmd/microservices/create/create.manual.go index 9ba0f1e68..edb6282a9 100644 --- a/pkg/cmd/microservices/create/create.manual.go +++ b/pkg/cmd/microservices/create/create.manual.go @@ -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 {