Skip to content

Commit e96a1d6

Browse files
committed
Fix typo and update reporting of Loop Error types
1 parent f6b3826 commit e96a1d6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Loop/Managers/AnalyticsServicesManager.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,16 @@ final class AnalyticsServicesManager {
176176
logEvent("Loop success", withProperties: ["duration": duration], outOfSession: true)
177177
}
178178

179-
func loopDidError(error: Error) {
180-
logEvent("Loop error", withProperties: ["description": error.localizedDescription], outOfSession: true)
179+
func loopDidError(error: LoopError) {
180+
var props = [AnyHashable: Any]()
181+
182+
props["issueId"] = error.issueId
183+
184+
for (detailKey, detail) in error.issueDetails {
185+
props[detailKey] = detail
186+
}
187+
188+
logEvent("Loop error", withProperties: props, outOfSession: true)
181189
}
182190

183191
func didIssueAlert(identifier: String, interruptionLevel: Alert.InterruptionLevel) {
@@ -189,7 +197,7 @@ final class AnalyticsServicesManager {
189197
}
190198

191199
func didCancelOverride(name: String) {
192-
logEvent("Override Enacted", withProperties: ["name": name])
200+
logEvent("Override Canceled", withProperties: ["name": name])
193201
}
194202
}
195203

0 commit comments

Comments
 (0)