From 36c3147b590470d04ef06fdc314036e43881dd8b Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Mon, 6 Jan 2025 17:35:33 +0000 Subject: [PATCH] Add an error log if the namespace doesn't exist --- Sources/Core/Tracker/WebViewMessageHandlerV2.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Core/Tracker/WebViewMessageHandlerV2.swift b/Sources/Core/Tracker/WebViewMessageHandlerV2.swift index dc42d5e73..77088c74e 100644 --- a/Sources/Core/Tracker/WebViewMessageHandlerV2.swift +++ b/Sources/Core/Tracker/WebViewMessageHandlerV2.swift @@ -73,6 +73,8 @@ class WebViewMessageHandlerV2: NSObject, WKScriptMessageHandler { for namespace in trackers { if let tracker = Snowplow.tracker(namespace: namespace) { _ = tracker.track(event) + } else { + logError(message: "WebView: Tracker with namespace \(namespace) not found.") } } } else {