Fix the logging of Feedly errors. #1628.

This commit is contained in:
Kiel Gillard 2020-01-21 18:31:35 +11:00
parent 460940b830
commit fb69a2bc54
2 changed files with 7 additions and 4 deletions

View File

@ -88,8 +88,10 @@ extension FeedlyDownloadArticlesOperation: FeedlyOperationDelegate {
func feedlyOperation(_ operation: FeedlyOperation, didFailWith error: Error) {
assert(Thread.isMainThread)
// TODO: fix error for below line "Error is not convertible to NSError"
//os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", operation, error as NSError)
// Having this log is useful for debugging missing required JSON keys in the response from Feedly, for example.
os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", String(describing: operation), error as NSError)
cancel()
}
}

View File

@ -159,8 +159,9 @@ extension FeedlySyncAllOperation: FeedlyOperationDelegate {
func feedlyOperation(_ operation: FeedlyOperation, didFailWith error: Error) {
assert(Thread.isMainThread)
// TODO: fix error for below line "Error is not convertible to NSError"
//os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", operation, error as NSError)
// Having this log is useful for debugging missing required JSON keys in the response from Feedly, for example.
os_log(.debug, log: log, "%{public}@ failed with error: %{public}@.", String(describing: operation), error as NSError)
syncCompletionHandler?(.failure(error))
syncCompletionHandler = nil