How to Modify Webhook Failure Retry Logic with Custom Rules
Adding custom rules to your webhook connections allows you to adapt and perfectly tailor the behavior of each connection without updating a ruleset and risking to disrupt other webhook connetions behavior.
Modify webhook failure retry logic tutorial
In this example, we have two connections related to our Source: Github
. Both Actions
and Deploy
use the default ruleset.
We want the retries for Deploy
to be faster, thus changing the retry logic from retry every 1 hour up to 5 times to retry every 2 minutes up to 5 times. If we were to do this directly on the Ruleset, we would impact the behavior of Actions
. Instead we are going to add a Custom Rule that only applies to the Deploy
connection.
Creating a Custom Rule
Let's create a Custom Rule for "Retry" that will override the ruleset's retry logic.
- Select the Connection
- Click Edit
- Select Retry
- Create the Custom Rule
- Click Save
Test the new rule
Let's validate the new behavior by sending mock webhooks using Postman. Then, we will monitor the next scheduled automatic retry.
The Result
As we can see, everything works as intended.
- The
Next Attempt
for theAction
is scheduled after 2 minutes. - The
Next Attempt
for theDeploy
is scheduled after 1 hour.
Great, we've successfully added a Custom Rule
updating the Retry Logic for the GitHub → Action webhook connection!