Log on `ShareWorker` Twitter exceptions
This commit is contained in:
parent
d73e269d85
commit
9dafa675d1
|
@ -16,10 +16,12 @@ class ShareWorker
|
|||
# The question to be posted was deleted
|
||||
return
|
||||
rescue Twitter::Error::DuplicateStatus
|
||||
logger.info "Tried to post answer ##{answer_id} from user ##{user_id} to Twitter but the status was already posted."
|
||||
return
|
||||
rescue Twitter::Error::Unauthorized
|
||||
# User's Twitter token has expired or been revoked
|
||||
# TODO: Notify user if this happens (https://github.com/Retrospring/retrospring/issues/123)
|
||||
logger.info "Tried to post answer ##{answer_id} from user ##{user_id} to Twitter but the token has exired or been revoked."
|
||||
return
|
||||
rescue => e
|
||||
logger.info "failed to post answer #{answer_id} to #{service} for user #{user_id}: #{e.message}"
|
||||
|
|
Loading…
Reference in New Issue