From 543e5a2c1b8267c64c21c0f8ab84b7bd9d5f5999 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Tue, 30 Mar 2021 12:27:24 -0300 Subject: [PATCH] Add a hint to the 'Unable to find tenant' error message (#215) * Add hint to 'Unable to find tenant' error message * Replace backticks --- internal/cli/cli.go | 2 +- internal/cli/logout.go | 2 +- internal/cli/tenants.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 363b1e199..dfbb628ca 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -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 { diff --git a/internal/cli/logout.go b/internal/cli/logout.go index 6f736fd26..3d195eb57 100644 --- a/internal/cli/logout.go +++ b/internal/cli/logout.go @@ -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 } diff --git a/internal/cli/tenants.go b/internal/cli/tenants.go index 8ba6c9ba9..4b1fb91d4 100644 --- a/internal/cli/tenants.go +++ b/internal/cli/tenants.go @@ -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 }