Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXCDT-318: Fix log streams error message #598

Merged
merged 14 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/cli/log_streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"encoding/json"
"errors"
"fmt"
"strings"

Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions internal/cli/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down