Skip to content

Commit

Permalink
Add a hint to the 'Unable to find tenant' error message (#215)
Browse files Browse the repository at this point in the history
* Add hint to 'Unable to find tenant' error message

* Replace backticks
  • Loading branch information
Widcket authored Mar 30, 2021
1 parent f1c5ab2 commit 543e5a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (c *cli) getTenant() (tenant, error) {

t, ok := c.config.Tenants[c.tenant]
if !ok {
return tenant{}, fmt.Errorf("Unable to find tenant: %s", c.tenant)
return tenant{}, fmt.Errorf("Unable to find tenant: %s; run 'auth0 tenants use' to see your configured tenants or run 'auth0 login' to configure a new tenant", c.tenant)
}

if t.Apps == nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func logoutCmd(cli *cli) *cobra.Command {
requestedTenant := args[0]
t, ok := cli.config.Tenants[requestedTenant]
if !ok {
return fmt.Errorf("Unable to find tenant %s; run `auth0 tenants use` to see your configured tenants or run `auth0 login` to configure a new tenant", requestedTenant)
return fmt.Errorf("Unable to find tenant %s; run 'auth0 tenants use' to see your configured tenants or run 'auth0 login' to configure a new tenant", requestedTenant)
}
selectedTenant = t.Name
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func useTenantCmd(cli *cli) *cobra.Command {
requestedTenant := args[0]
t, ok := cli.config.Tenants[requestedTenant]
if !ok {
return fmt.Errorf("Unable to find tenant %s; run `auth0 tenants use` to see your configured tenants or run `auth0 login` to configure a new tenant", requestedTenant)
return fmt.Errorf("Unable to find tenant %s; run 'auth0 tenants use' to see your configured tenants or run 'auth0 login' to configure a new tenant", requestedTenant)
}
selectedTenant = t.Name
}
Expand Down

0 comments on commit 543e5a2

Please sign in to comment.