Skips logging cancelled errors

This commit is contained in:
nythepegasus
2024-05-08 23:54:36 -04:00
committed by ny
parent 3e6ca7c673
commit d0b424f408

View File

@@ -320,6 +320,10 @@ extension AppManager
func log(_ error: Error, operation: LoggedError.Operation, app: AppProtocol)
{
switch error {
case ~OperationError.Code.cancelled: return // Don't log cancelled events
default: break
}
// Sanitize NSError on same thread before performing background task.
let sanitizedError = (error as NSError).sanitizedForSerialization()