include underlying error

This commit is contained in:
Michael Kirk 2020-02-12 22:23:14 -07:00
parent 081c48cfeb
commit 04bf07e4ab

View File

@ -43,6 +43,14 @@ public struct StorageService {
return statusCode >= 500
}
}
public var errorUserInfo: [String: Any] {
var userInfo: [String: Any] = [OWSOperationIsRetryableKey: self.isRetryable]
if case .networkError(_, let underlyingError) = self {
userInfo[NSUnderlyingErrorKey] = underlyingError
}
return userInfo
}
}
/// An identifier representing a given storage item.