Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion client/telemetry/TelemetryEventClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
cloudProviderIdentifier "github.com/devtron-labs/common-lib/cloud-provider-identifier"
posthogTelemetry "github.com/devtron-labs/common-lib/telemetry"
Expand Down Expand Up @@ -690,8 +691,13 @@ func (impl *TelemetryEventClientImpl) checkForOptOut(ctx context.Context, UCID s
if err != nil {
// this should be non-blocking call and should not fail the request for ucid getting
impl.logger.Errorw("check opt-out list failed, rest api error", "ucid", UCID, "err", err)
return false, err
}
flag, ok := response["result"].(bool)
if !ok {
impl.logger.Errorw("check opt-out list failed, type assertion error", "ucid", UCID)
return false, errors.New("type assertion error")
}
flag := response["result"].(bool)
return flag, nil
}

Expand Down
Loading