iachat/app
Sojan Jose ab93821d2b
fix(agent-bot): stabilize webhook delivery for transient upstream failures (#13521)
This fixes the agent-bot webhook delivery path so transient upstream
failures follow the expected delivery lifecycle. Existing fallback
behavior is preserved, and fallback actions are applied only after
delivery attempts are exhausted.

To reproduce, configure an agent-bot webhook endpoint to return 429/500
for message events. Before this fix, failure handling could be applied
too early; after this fix, delivery attempts complete first and then
existing fallback handling runs.

Tested with:
- bundle exec rspec spec/jobs/agent_bots/webhook_job_spec.rb
spec/lib/webhooks/trigger_spec.rb
- bundle exec rubocop spec/jobs/agent_bots/webhook_job_spec.rb
spec/lib/webhooks/trigger_spec.rb

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-03-02 14:18:29 +04:00
..
actions fix: Disable enqueueing Avatar jobs if the URL is invalid (#12035) 2025-07-24 12:56:39 +04:00
assets feat: Hide installation identifier (#11722) 2025-06-17 15:45:40 -07:00
builders feat(facebook): Mark Messenger native-app echoes as external echo message (#13665) 2026-02-26 19:05:15 +04:00
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
controllers feat(csat): Add WhatsApp utility template analyzer with rewrite guidance (#13575) 2026-02-24 15:11:04 +04:00
dashboards feat: Auto confirm user email when super admin make changes (#12418) 2025-09-23 20:14:02 +05:30
dispatchers feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
fields chore: improve plan-based feature handling with plan hierarchy (#11335) 2025-04-28 14:13:56 -07:00
finders feat: Add a priority + created at sort for conversations (#13658) 2026-02-25 18:22:41 -08:00
helpers feat: better errors for SMTP (#13401) 2026-02-23 16:00:17 +05:30
javascript chore: make all the deprecated feature flag reclaimable (#13646) 2026-02-26 18:01:13 +05:30
jobs fix(agent-bot): stabilize webhook delivery for transient upstream failures (#13521) 2026-03-02 14:18:29 +04:00
listeners feat: add per-webhook secret with backfill migration (#13573) 2026-02-26 17:26:12 +05:30
mailboxes refactor: strategy pattern for mailbox conversation finding (#12766) 2025-11-10 20:47:18 +05:30
mailers feat: add per-account daily rate limit for outbound emails (#13411) 2026-02-03 02:06:51 +05:30
models feat: Add temporary account setting to disable Captain auto-resolve (#13680) 2026-02-27 09:37:00 -08:00
policies feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
presenters fix(mailbox): handle malformed sender address headers (#13486) 2026-02-11 11:02:38 -08:00
services fix: call authorization_error! on IMAP auth failures (#13560) (revert) (#13671) 2026-02-26 18:45:18 -08:00
views feat: add per-webhook secret with backfill migration (#13573) 2026-02-26 17:26:12 +05:30