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
|
# The question to be posted was deleted
|
||||||
return
|
return
|
||||||
rescue Twitter::Error::DuplicateStatus
|
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
|
return
|
||||||
rescue Twitter::Error::Unauthorized
|
rescue Twitter::Error::Unauthorized
|
||||||
# User's Twitter token has expired or been revoked
|
# User's Twitter token has expired or been revoked
|
||||||
# TODO: Notify user if this happens (https://github.com/Retrospring/retrospring/issues/123)
|
# 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
|
return
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.info "failed to post answer #{answer_id} to #{service} for user #{user_id}: #{e.message}"
|
logger.info "failed to post answer #{answer_id} to #{service} for user #{user_id}: #{e.message}"
|
||||||
|
|
Loading…
Reference in New Issue