Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOT PUBLISHED BUT IN OPS PROD] - handle not_in_channel issue #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vguiot
Copy link

@vguiot vguiot commented Apr 15, 2020

Hello @bcorne

Itiviti/simple-slack-api#152 is occurring on Itiviti/Ullink Ops bot as well

Basically when the bot is not present on a channel which is however flagged in the DB as a channel listening to the project https://github.com/Itiviti/slack4gerrit/blob/master/src/main/java/jobs/PublishMessageJob.java#L98 (might happen if the bot was removed from the channel...), then it does not post anything to Slack and logs this error "java.lang.ClassCastException: com.ullink.slack.simpleslackapi.replies.SlackReplyImpl cannot be cast to com.ullink.slack.simpleslackapi.replies.SlackMessageReply", which is meaningless indeed, when calling line https://github.com/Itiviti/slack4gerrit/blob/master/src/main/java/jobs/PublishMessageJob.java#L109

I did this local workaround inspired from the comments here (many thanks @centic9 ) but we would probably need a more robust way of handling this pb (with some explicit logging / slack msg)

Many thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant