fix: hook exception for empty hook (#6646)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class Integrations::BotProcessorService
|
||||
# TODO: In CSML processor service, the argument is agent bot, update initializers accordingly.
|
||||
pattr_initialize [:event_name!, :hook!, :event_data!]
|
||||
|
||||
def perform
|
||||
@@ -7,7 +8,7 @@ class Integrations::BotProcessorService
|
||||
|
||||
process_content(message)
|
||||
rescue StandardError => e
|
||||
ChatwootExceptionTracker.new(e, account: hook.account).capture_exception
|
||||
ChatwootExceptionTracker.new(e, account: (hook&.account || agent_bot&.account)).capture_exception
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user