From ebc96ccdcdc91d6ec4b84accab29e650f80f9187 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 11 Jan 2023 11:55:11 -0500 Subject: [PATCH] Fixing no log streams error message, removing roles error out of global namespace --- internal/cli/log_streams.go | 3 ++- internal/cli/roles.go | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/cli/log_streams.go b/internal/cli/log_streams.go index 4f36d3c7f..0c6ce7777 100644 --- a/internal/cli/log_streams.go +++ b/internal/cli/log_streams.go @@ -2,6 +2,7 @@ package cli import ( "encoding/json" + "errors" "fmt" "strings" @@ -827,7 +828,7 @@ func (c *cli) logStreamPickerOptions() (pickerOptions, error) { } if len(opts) == 0 { - return nil, errNoRoles + return nil, errors.New("there are currently no log streams") } return opts, nil diff --git a/internal/cli/roles.go b/internal/cli/roles.go index 417fd422d..6d1a4a368 100644 --- a/internal/cli/roles.go +++ b/internal/cli/roles.go @@ -11,9 +11,6 @@ import ( "github.com/auth0/auth0-cli/internal/prompt" ) -// errNoRoles signifies no roles exist in a tenant. -var errNoRoles = errors.New("there are currently no roles") - var ( roleID = Argument{ Name: "Role ID", @@ -338,7 +335,7 @@ func (c *cli) rolePickerOptions() (pickerOptions, error) { } if len(opts) == 0 { - return nil, errNoRoles + return nil, errors.New("there are currently no roles") } return opts, nil