Skip to content

Commit

Permalink
update errors for completion and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
morganelle committed Mar 5, 2021
1 parent 204fda3 commit 3672d25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions internal/cli/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ PS> auth0 completion powershell > auth0.ps1
case "bash":
err := cmd.Root().GenBashCompletion(os.Stdout)
if err != nil {
cli.renderer.Errorf(err.Error())
cli.renderer.Errorf("An unexpected error occurred while setting up completion: %v", err.Error())
}
case "zsh":
err := cmd.Root().GenZshCompletion(os.Stdout)
if err != nil {
cli.renderer.Errorf(err.Error())
cli.renderer.Errorf("An unexpected error occurred while setting up completion: %v", err.Error())
}
case "fish":
err := cmd.Root().GenFishCompletion(os.Stdout, true)
if err != nil {
cli.renderer.Errorf(err.Error())
cli.renderer.Errorf("An unexpected error occurred while setting up completion: %v", err.Error())
}
case "powershell":
err := cmd.Root().GenPowerShellCompletion(os.Stdout)
if err != nil {
cli.renderer.Errorf(err.Error())
cli.renderer.Errorf("An unexpected error occurred while setting up completion: %v", err.Error())
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Show the tenant logs.
lastLogID := ""
list, err := getLatestLogs(cli, flags.Num)
if err != nil {
return err
return fmt.Errorf("An unexpected error occurred while getting logs: %v", err)
}

// TODO(cyx): This is a hack for now to make the
Expand Down Expand Up @@ -76,7 +76,7 @@ Show the tenant logs.
management.Parameter("sort", "date:-1"),
)
if err != nil {
cli.renderer.Errorf("Error: %v", err)
cli.renderer.Errorf("An unexpected error occurred while getting logs: %v", err)
return
}

Expand Down

0 comments on commit 3672d25

Please sign in to comment.