From 7edae93ee81d2c26ca6ca8dbcc9bb5f8df5ed6ba Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Tue, 24 Mar 2026 10:52:37 +0400 Subject: [PATCH] fix(agent-bot): Include payload in webhook retry failure logs (#13879) Webhook retry failure logs for agent-bot now include the event payload, making it easier to identify which event failed when debugging transient upstream errors (429/500). Previously the log only showed: `[AgentBots::WebhookJob] attempt 1 failed RestClient::InternalServerError` Now it includes the payload: `[AgentBots::WebhookJob] attempt 1 failed RestClient::InternalServerError payload={"event":"message_created",...}` Co-authored-by: Claude Opus 4.6 (1M context) --- app/jobs/agent_bots/webhook_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/agent_bots/webhook_job.rb b/app/jobs/agent_bots/webhook_job.rb index 2786ce70e..d752034a7 100644 --- a/app/jobs/agent_bots/webhook_job.rb +++ b/app/jobs/agent_bots/webhook_job.rb @@ -8,7 +8,7 @@ class AgentBots::WebhookJob < WebhookJob def perform(url, payload, webhook_type = :agent_bot_webhook) super(url, payload, webhook_type) rescue RestClient::TooManyRequests, RestClient::InternalServerError => e - Rails.logger.warn("[AgentBots::WebhookJob] attempt #{executions} failed #{e.class.name}") + Rails.logger.warn("[AgentBots::WebhookJob] attempt #{executions} failed #{e.class.name} payload=#{payload.to_json}") raise end end