Skip to content

Commit a658633

Browse files
committed
Add catch block
1 parent 9a5e980 commit a658633

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/PopupBridge/AnalyticsService.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ final class AnalyticsService: AnalyticsServiceable {
2828

2929
func performEventRequest(_ eventName: String, sessionID: String) async {
3030
let body = createAnalyticsEvent(eventName: eventName, sessionID: sessionID)
31-
try? await networkClient.post(url: url, body: body)
31+
do {
32+
try await networkClient.post(url: url, body: body)
33+
} catch {
34+
NSLog("[PopupBridge SDK] Failed to send analytics: %@", error.localizedDescription)
35+
}
3236
}
3337

3438
// MARK: - Private Methods

0 commit comments

Comments
 (0)