Skip to content

Commit

Permalink
[telemetry] Don't log user errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeland73 committed Sep 27, 2024
1 parent 58ed80e commit f68fafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/boxcli/midcobra/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (m *telemetryMiddleware) postRun(cmd *cobra.Command, args []string, runErr
defer telemetry.Stop()

var userExecErr *usererr.ExitError
if errors.As(runErr, &userExecErr) {
if errors.As(runErr, &userExecErr) || !usererr.ShouldLogError(runErr) {
return
}

Expand Down

0 comments on commit f68fafa

Please sign in to comment.