Skip to content
Open
1 change: 1 addition & 0 deletions apps/cli-go/internal/sso/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func Run(ctx context.Context, params RunParams) error {
}

if putResp.JSON200 == nil {
// GET branch above early-returns on failure, so this and the GET fire are mutually exclusive (max one event per invocation).
if orgSlug, isGated := utils.SuggestUpgradeOnError(ctx, params.ProjectRef, "auth.saml_2", putResp.StatusCode()); isGated {
telemetry.TrackUpgradeSuggested(ctx, "auth.saml_2", orgSlug)
}
Expand Down
6 changes: 1 addition & 5 deletions apps/cli-go/internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1242,11 +1242,7 @@ EOF
if err := start.WaitForHealthyService(ctx, serviceTimeout, started...); err != nil {
return err
}
if service := phtelemetry.FromContext(ctx); service != nil {
if err := service.Capture(ctx, phtelemetry.EventStackStarted, nil, nil); err != nil {
fmt.Fprintln(utils.GetDebugLogger(), err)
}
}
_ = phtelemetry.FromContext(ctx).Capture(ctx, phtelemetry.EventStackStarted, nil, nil)
return nil
}

Expand Down
5 changes: 1 addition & 4 deletions apps/cli-go/internal/vanity_subdomains/check/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/go-errors/errors"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/telemetry"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/api"
)
Expand All @@ -19,9 +18,7 @@ func Run(ctx context.Context, projectRef string, desiredSubdomain string, fsys a
if err != nil {
return errors.Errorf("failed to check vanity subdomain: %w", err)
} else if resp.JSON201 == nil {
if orgSlug, isGated := utils.SuggestUpgradeOnError(ctx, projectRef, "vanity_subdomain", resp.StatusCode()); isGated {
telemetry.TrackUpgradeSuggested(ctx, "vanity_subdomain", orgSlug)
}
utils.SuggestUpgradeOnError(ctx, projectRef, "vanity_subdomain", resp.StatusCode())
return errors.Errorf("unexpected check vanity subdomain status %d: %s", resp.StatusCode(), string(resp.Body))
}
if utils.OutputFormat.Value != utils.OutputPretty {
Expand Down
Loading