diff --git a/website/cue/reference/remap/expressions/function_call.cue b/website/cue/reference/remap/expressions/function_call.cue index 2226dd23652f9..8d414d4027abb 100644 --- a/website/cue/reference/remap/expressions/function_call.cue +++ b/website/cue/reference/remap/expressions/function_call.cue @@ -167,5 +167,21 @@ remap: expressions: function_call: { """# return: ["hello", "world!"] }, + { + title: "Infallible function invocation" + source: #""" + split("apples and pears and bananas", " and ") + """# + return: ["apples", "pears", "bananas"] + }, + { + title: "Fallible function invocation" + input: log: message: "apples and pears and bananas" + source: #""" + # The compiler cannot determine the argument type thus we need to do error handling. + split!(.message, " and ") + """# + return: ["apples", "pears", "bananas"] + }, ] }