Skip to content

Commit 5898421

Browse files
authored
Merge pull request #5765 from segmentio/bobbyatsegment-patch-1
Add note on returning event object in handler
2 parents 0b347e3 + 163737b commit 5898421

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/connections/functions/insert-functions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ async function onTrack(event) {
100100

101101
To change which event type the handler listens to, you can rename it to the name of the message type. For example, if you rename this function `onIdentify`, it listens for "Identify" events instead.
102102

103+
To ensure the Destination processes an event payload modified by the function, return the `event` object at the handler's end.
104+
103105
> info ""
104106
> Functions' runtime includes a `fetch()` polyfill using a `node-fetch` package. Check out the [node-fetch documentation](https://www.npmjs.com/package/node-fetch){:target="_blank"} for usage examples.
105107

0 commit comments

Comments
 (0)