From 2e258ca785885d09ea8ecb4acec6f4a0455125e2 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Mon, 24 Jul 2023 10:27:24 -0600 Subject: [PATCH] Log error_message --- .../Source/PaymentSheet/STPAnalyticsClient+PaymentSheet.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/STPAnalyticsClient+PaymentSheet.swift b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/STPAnalyticsClient+PaymentSheet.swift index 2ac2c18fee1..9aec9a454ec 100644 --- a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/STPAnalyticsClient+PaymentSheet.swift +++ b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/STPAnalyticsClient+PaymentSheet.swift @@ -260,6 +260,9 @@ extension STPAnalyticsClient { additionalParams["currency"] = currency additionalParams["is_decoupled"] = intentConfig != nil additionalParams["error_domain"] = (error as? NSError)?.domain + if let error = error as? PaymentSheetError { + additionalParams["error_message"] = error.safeLoggingString + } additionalParams["deferred_intent_confirmation_type"] = deferredIntentConfirmationType?.rawValue for (param, param_value) in params {