зеркало из https://github.com/github/octobox.git
Gracefully handle deleted notifications
Security notifications seem to get automatically deleted by GitHub sometimes
This commit is contained in:
Родитель
1a0db2f5c1
Коммит
28e24c9ac0
|
@ -86,7 +86,7 @@ class Notification < ApplicationRecord
|
|||
conn.patch "notifications/threads/#{n.github_id}"
|
||||
end
|
||||
end
|
||||
rescue Octokit::Forbidden
|
||||
rescue Octokit::Forbidden, Octokit::NotFound
|
||||
# one or more notifications are for repos the user no longer has access to
|
||||
end
|
||||
where(id: unread.map(&:id)).update_all(unread: false)
|
||||
|
|
Загрузка…
Ссылка в новой задаче