Skip to content

Commit 98256ec

Browse files
authored
Add error handling for post likes (#24585)
1 parent 779961a commit 98256ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailToolbar.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ class ReaderDetailToolbar: UIView, NibLoadable {
139139
self?.trackArticleDetailsLikedOrUnliked()
140140
}, failure: { [weak self] (error: Error?) in
141141
self?.trackArticleDetailsLikedOrUnliked()
142-
if let anError = error {
143-
DDLogError("Error (un)liking post: \(anError.localizedDescription)")
142+
if let error {
143+
DDLogError("Error (un)liking post: \(error.localizedDescription)")
144+
Notice(error: error).post()
145+
UINotificationFeedbackGenerator().notificationOccurred(.error)
144146
}
145147
})
146148
}

0 commit comments

Comments
 (0)