From 1a53c6ed39f45a6e882bfd6101263fe03a3f317b Mon Sep 17 00:00:00 2001 From: Spencer Attick <23665784+spencerattick@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:48:26 -0500 Subject: [PATCH 1/2] info on new error message --- src/connections/functions/source-functions.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/connections/functions/source-functions.md b/src/connections/functions/source-functions.md index 646db8e948..76e4c892a8 100644 --- a/src/connections/functions/source-functions.md +++ b/src/connections/functions/source-functions.md @@ -438,3 +438,7 @@ The test function interface has a 4KB console logging limit. Outputs surpassing #### Can I send a custom response from my Source Function to an external tool? No, Source Functions can't send custom responses to the tool that triggered the Function's webhook. Source Functions can only send a success or failure response, not a custom one. + +#### When I try to save my Source Function, why am I seeing this error message: "Functions are unable to send data or events back to their originating source. Please ensure the URL used for outgoing data from the function is correct."? + +To prevent possible infinite looping, Segment checks your Function code to ensure that you don't have `https://fn.segmentapis.com` included. That URL is used to send data to a Source Function. Including that URL in your Function code is a sign that an infinite loop may occur so Segment ensures you can't save your Function if that URL is included. To fix this, please remove that URL from your Function code. From 22f8ea9357129d1b97d077feec97905b6abe8506 Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:39:29 -0600 Subject: [PATCH 2/2] rewording --- src/connections/functions/source-functions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connections/functions/source-functions.md b/src/connections/functions/source-functions.md index 76e4c892a8..d9513df49d 100644 --- a/src/connections/functions/source-functions.md +++ b/src/connections/functions/source-functions.md @@ -439,6 +439,8 @@ The test function interface has a 4KB console logging limit. Outputs surpassing No, Source Functions can't send custom responses to the tool that triggered the Function's webhook. Source Functions can only send a success or failure response, not a custom one. -#### When I try to save my Source Function, why am I seeing this error message: "Functions are unable to send data or events back to their originating source. Please ensure the URL used for outgoing data from the function is correct."? +#### Why am I seeing the error "Functions are unable to send data or events back to their originating source" when trying to save my Source Function? -To prevent possible infinite looping, Segment checks your Function code to ensure that you don't have `https://fn.segmentapis.com` included. That URL is used to send data to a Source Function. Including that URL in your Function code is a sign that an infinite loop may occur so Segment ensures you can't save your Function if that URL is included. To fix this, please remove that URL from your Function code. +This error occurs because Segment prevents Source Functions from sending data back to their own webhook endpoint (`https://fn.segmentapis.com`). Allowing this could create an infinite loop where the function continuously triggers itself. + +To resolve this error, check your Function code and ensure the URL `https://fn.segmentapis.com` is not included. This URL is used to send data to a Source Function and shouldn't appear in your outgoing requests. Once you remove this URL from your code, you’ll be able to save the Function successfully.