mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	chore: Rescue Slack::Web::Api::Errors::NotInChannel error (#8670)
				
					
				
			The primary cause of this issue is when Chatwoot sends a message to a channel that has either been deleted or is unauthorized. So, we will prompt reauthorization when this error occurs. Fixes https://linear.app/chatwoot/issue/CW-2930/slackwebapierrorsnotinchannel-not-in-channel
This commit is contained in:
		| @@ -97,7 +97,7 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService | ||||
|     post_message if message_content.present? | ||||
|     upload_file if message.attachments.any? | ||||
|   rescue Slack::Web::Api::Errors::AccountInactive, Slack::Web::Api::Errors::MissingScope, Slack::Web::Api::Errors::InvalidAuth, | ||||
|          Slack::Web::Api::Errors::ChannelNotFound => e | ||||
|          Slack::Web::Api::Errors::ChannelNotFound, Slack::Web::Api::Errors::NotInChannel => e | ||||
|     Rails.logger.error e | ||||
|     hook.prompt_reauthorization! | ||||
|     hook.disable | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Muhsin Keloth
					Muhsin Keloth