Skip to content

Commit

Permalink
Properly set error type when tracking error
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeMucientes committed Dec 31, 2024
1 parent 5840134 commit 0620818
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.lifecycle.asLiveData
import com.woocommerce.android.R
import com.woocommerce.android.analytics.AnalyticsEvent
import com.woocommerce.android.analytics.AnalyticsTracker.Companion.KEY_ERROR
import com.woocommerce.android.analytics.AnalyticsTracker.Companion.KEY_ERROR_TYPE
import com.woocommerce.android.analytics.AnalyticsTrackerWrapper
import com.woocommerce.android.tools.SelectedSite
import com.woocommerce.android.ui.sitepicker.SitePickerRepository
Expand Down Expand Up @@ -90,10 +89,7 @@ class WooSitesVisibilityViewModel @Inject constructor(
if (it is NotificationSettingsUpdateError) {
trackerWrapper.track(
stat = AnalyticsEvent.SITE_PICKER_LIST_SAVING_FAILURE,
properties = mapOf(
KEY_ERROR to it.message,
KEY_ERROR_TYPE to it.type
)
properties = mapOf(KEY_ERROR to it.type.toString())
)
}
triggerEvent(
Expand Down

0 comments on commit 0620818

Please sign in to comment.