Skip to content

Commit a255752

Browse files
committed
Updates to batch parameters, error sections
1 parent bf132d4 commit a255752

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/connections/functions/destination-functions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ If your function fails, you can check the error details and logs in the **Output
192192
Batch handlers are an extension of destination functions. When you define an `onBatch` handler alongside the handler functions for single events (for example: `onTrack` or `onIdentity`), you're telling Segment that the destination function can accept and handle batches of events.
193193

194194
> info ""
195-
> Batching is available to destination functions only.
195+
> Batching is available for destination functions only.
196196
197197
### When to use batching
198198

@@ -278,7 +278,7 @@ async function onIdentifyBatch(events, settings) {
278278

279279
### Configure your batch parameters
280280

281-
By default, Functions waits up to 10 seconds to form a batch of 20 events. You can increase the number of events included in each batch (up to 400 events per batch) by contacting [Segment support](https://segment.com/help/contact/){:target="_blank"}. Segment recommends users who wish to include fewer than 20 events per batch use destination Functions without the `onBatch` handler.
281+
By default, Functions waits up to 10 seconds to form a batch of 20 events. You can increase the number of events included in each batch (up to 400 events per batch) by contacting [Segment support](https://segment.com/help/contact/){:target="_blank"}. Segment recommends users who wish to include fewer than 20 events per batch use destination functions without the `onBatch` handler.
282282

283283
### Test the batch handler
284284

@@ -295,7 +295,7 @@ The [Config API](/docs/config-api/) Functions/Preview endpoint also supports tes
295295

296296
### Handling batching errors
297297

298-
Standard [function error types](/docs/connections/functions/destination-functions/#destination-functions-error-types) apply to batch handlers. Segment attempts to retry the batch in the case of Timeout or Retry errors. For all other error types, Segment discards the batch. If only part of a batch succeeds, Segment does not retry the failing part of the batch.
298+
Standard [function error types](/docs/connections/functions/destination-functions/#destination-functions-error-types) apply to batch handlers. Segment attempts to retry the batch in the case of Timeout or Retry errors. For all other error types, Segment discards the batch.
299299

300300
| Error Type | Result |
301301
| ---------------------- | ------- |
@@ -306,6 +306,8 @@ Standard [function error types](/docs/connections/functions/destination-function
306306
| Timeout | Retry |
307307
| Unsupported Event Type | Discard |
308308

309+
If only part of a batch succeeds and the failed events return either a `RetryError` or `Timeout` error, Segment retries the entire batch. You can optionally configure a response array for partially failed syncs and retry only the failed events in a batch. To configure the response array for partially failed syncs, [contact Segment support](https://segment.com/help/contact/){:target="_blank"}.
310+
309311
## Save and deploy the function
310312

311313
Once you finish building your destination function, click **Configure** to name it, then click **Create Function** to save it.

0 commit comments

Comments
 (0)