fix(webhook): do not retry after a successful trigger delivery#2674
Open
WilliamBergamin wants to merge 2 commits into
Open
fix(webhook): do not retry after a successful trigger delivery#2674WilliamBergamin wants to merge 2 commits into
WilliamBergamin wants to merge 2 commits into
Conversation
WebhookTrigger.send() read the success body with response.json(), which
throws on an empty or non-JSON 2xx body. That error was wrapped as a
retryable WebhookTriggerRequestError, so a trigger that already fired got
resent, causing duplicate Workflow Builder runs.
Read the 2xx body tolerantly via a new buildResult() that mirrors
IncomingWebhook: an empty or unparseable body resolves to { ok: true },
while a valid JSON body (including { ok: false, error }) is still surfaced.
A genuine mid-body read failure still propagates as retryable.
Fixes #2673
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
🦋 Changeset detectedLatest commit: 16c29e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2674 +/- ##
==========================================
- Coverage 89.11% 89.10% -0.01%
==========================================
Files 65 65
Lines 10339 10348 +9
Branches 471 474 +3
==========================================
+ Hits 9214 9221 +7
- Misses 1095 1097 +2
Partials 30 30
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
WilliamBergamin
marked this pull request as ready for review
July 23, 2026 17:27
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2673.
WebhookTrigger.send()retried after a trigger had already fired. This caused duplicate Workflow Builder runs.The cause is the success path. It read the body with
response.json(). That call throws on an empty or non-JSON 2xx body. The thrown error was wrapped as aWebhookTriggerRequestError, whichp-retrytreats as retryable. So a trigger that already succeeded got sent again.The fix reads the 2xx body tolerantly in a new
buildResult()method. It mirrorsIncomingWebhook.Requirements