From 60fee519bdaf15c8750ce2bb6d4e157ad9c33a22 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Fri, 3 Mar 2023 12:14:44 +0530 Subject: [PATCH] Exception tracker with account (#6603) --- app/services/agent_bots/validate_bot_service.rb | 2 +- lib/integrations/bot_processor_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/agent_bots/validate_bot_service.rb b/app/services/agent_bots/validate_bot_service.rb index fbb6b446a..d8c0b8a9c 100644 --- a/app/services/agent_bots/validate_bot_service.rb +++ b/app/services/agent_bots/validate_bot_service.rb @@ -32,7 +32,7 @@ class AgentBots::ValidateBotService response = csml_client.validate(csml_bot_payload) response.blank? || response['valid'] rescue StandardError => e - ChatwootExceptionTracker.new(e, account: agent_bot).capture_exception + ChatwootExceptionTracker.new(e, account: agent_bot&.account).capture_exception false end end diff --git a/lib/integrations/bot_processor_service.rb b/lib/integrations/bot_processor_service.rb index c8d220eca..b8a8c4895 100644 --- a/lib/integrations/bot_processor_service.rb +++ b/lib/integrations/bot_processor_service.rb @@ -7,7 +7,7 @@ class Integrations::BotProcessorService process_content(message) rescue StandardError => e - ChatwootExceptionTracker.new(e, account: hook).capture_exception + ChatwootExceptionTracker.new(e, account: hook.account).capture_exception end private