Log message if `ShareWorker` tries to post something deleted

This commit is contained in:
Karina Kwiatek 2021-12-27 18:17:47 +01:00
parent 58a5065e52
commit 9c599db3a7
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ class ShareWorker
user_service.post(Answer.find(answer_id))
rescue ActiveRecord::RecordNotFound
logger.info "Tried to post answer ##{answer_id} for user ##{user_id} to #{service.titleize} but the user/answer/service did not exist (likely deleted), will not retry."
# The question to be posted was deleted
return
rescue Twitter::Error::DuplicateStatus