Skip to content

Commit 5dd700f

Browse files
authored
Merge pull request #7022 from segmentio/samkcrespo-patch-11
Update destination-functions.md - add details on how to gracefully ha…
2 parents 1399dec + 324f793 commit 5dd700f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/connections/functions/destination-functions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ To change which event type the handler listens to, you can rename it to the name
8383

8484
{% include content/functions/errors-and-error-handling.md %}
8585

86+
You can incorporate a a `try-catch` block to ensure smooth operation of functions even when fetch calls fail. This allows for the interception of any errors during the API call, enabling the application of specific error handling procedures, such as error logging for future debugging, or the assignment of fallback values when the API call is unsuccessful. By positioning the continuation logic either outside the `try-catch` block or within a `finally` block, the function is guaranteed to proceed with its execution, maintaining its workflow irrespective of the outcome of the API call.
87+
8688
You can read more about [error handling](#destination-functions-logs-and-errors) below.
8789

8890
### Runtime and dependencies

0 commit comments

Comments
 (0)