Skip to content

Commit 2141f76

Browse files
[GB-MONITOR] Fix Mac Build After #347 (Sentry Exception Type Is Optional) (#348)
* fix(gb-monitor): compactMap Sentry exception types so the Mac build compiles * gb-monitor: fix iOS companion build (Sentry exception type is optional)
1 parent d7707e8 commit 2141f76

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎Sources/CodeCaps/SentryTelemetry.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ enum SentryTelemetry {
4242
options.beforeSend = { event in
4343
if isThirdPartyFailedRequest(
4444
url: event.request?.url,
45-
exceptionTypes: event.exceptions?.map(\.type) ?? []
45+
exceptionTypes: event.exceptions?.compactMap { $0.type } ?? []
4646
) { return nil }
4747
return sanitize(event)
4848
}

‎ios/CodeCapsCompanion/App/SentryTelemetry.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ enum SentryTelemetry {
4949
options.beforeSend = { event in
5050
if isThirdPartyFailedRequest(
5151
url: event.request?.url,
52-
exceptionTypes: event.exceptions?.map(\.type) ?? []
52+
exceptionTypes: event.exceptions?.compactMap { $0.type } ?? []
5353
) { return nil }
5454
return sanitize(event)
5555
}

0 commit comments

Comments
 (0)