@@ -19,6 +19,31 @@ a feature of our proxy, you will not need to modify any part of your code to use
1919functionality. You should, however, ensure that your endpoint is able to receive POST requests. While
2020this will work for both Cortex and Custom runtimes, it will only work for HTTP requests, and not websockets.
2121
22+ ## Retry Behavior
23+
24+ Webhook requests are sent asynchronously and will not block your function's response. If a webhook delivery fails,
25+ we automatically retry with the following behavior:
26+
27+ - ** Maximum attempts** : 3 attempts total
28+ - ** Delay between retries** : Up to 5 seconds between attempts
29+
30+ ** Retry conditions:**
31+
32+ - Network errors (connection failures, timeouts) will trigger retries
33+ - ` 404 Not Found ` responses will trigger retries (endpoint may be temporarily unreachable)
34+ - Other ` 4xx ` client errors will ** not** be retried (considered permanent failures)
35+ - ` 5xx ` server errors will ** not** be retried (to avoid potential duplicate side effects)
36+ - Non-2xx responses (excluding the above) will trigger retries
37+
38+ If all attempts fail, the error is logged but will not affect your function's response to the original caller.
39+
40+ <Warning >
41+ ** Your webhook endpoint should be idempotent.** In some cases, we may retry a
42+ webhook even if it was processed successfully—for example, if our backend
43+ doesn't receive the success response from your webhook server due to network
44+ issues. Design your endpoint to handle duplicate deliveries gracefully.
45+ </Warning >
46+
2247To illustrate this, suppose your function returns ` {"smile": "wave"} ` . We would then make a POST call from
2348our proxy that would look like this to your webhook:
2449
0 commit comments