Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc22aa6

Browse files
committed
Updates from PM review [netlify-build]
1 parentf71505f commitbc22aa6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

‎src/_includes/content/functions/logs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
If your function throws an error, execution halts immediately. Segment captures the event, any outgoing requests/responses, any logs the function might have printed, as well as the error itself.
22

3-
Segment then displays the captured error information in the[Event Delivery](/docs/connections/event-delivery/) page for yourfunction. You can use this information to find and fix unexpected errors.
3+
Segment then displays the captured error information in the[Event Delivery](/docs/connections/event-delivery/) page for yourdestination. You can use this information to find and fix unexpected errors.
44

55
You can throw[an error or a custom error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error){:target="_blank"} and you can also add helpful context in logs using the[`console` API](https://developer.mozilla.org/en-US/docs/Web/API/console){:target="_blank"}. For example:
66

‎src/connections/functions/insert-functions.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ To create a batch handler, define an `onBatch` function within your destination
261261
```js
262262
asyncfunctiononBatch(events,settings){
263263
// handle the batch of events
264+
return events
264265
}
265266
```
266267

@@ -326,15 +327,23 @@ async function onBatch(events, settings) {
326327
// ...handle other event types here...
327328
}
328329
})
329-
returnPromise.all(promises)
330+
try {
331+
constresults=awaitPromise.all(promises);
332+
constbatchResult= [].concat(...results);// Combine arrays into a single array
333+
return batchResult;
334+
}catch (error) {
335+
thrownewRetryError(error.message);
336+
}
330337
}
331338

332339
asyncfunctiononTrackBatch(events,settings) {
333340
// handle a batch of track events
341+
return events
334342
}
335343

336344
asyncfunctiononIdentifyBatch(events,settings) {
337345
// handle a batch of identify events
346+
return events
338347
}
339348
```
340349

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp