Error is:
Unable to process template language expressions in action 'Initialise_SubjectTrimmed' inputs at line '0' and column '0': 'The template language expression 'trim(split(split(variables('EmailSubject'),'Issue ')[1],':')[0])' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.
My code is:
trim(split(split(variables('EmailSubject'),'Issue ')[1],':')[0])
What I'm trying to do:
The code takes the subject from an email and tries to find the text between "Issue " and ":". For example, if the email subject is "Issue 123: something is broken", the output is 123.
The problem:
If the Issue text exists, the script functions normally. I have configured a runafter if the above action fails (eg there was no issue text) and the entire script functions. However, this triggers the above error and the flow is considered a failure. Ultimately I don't care about the error as I'm handling it, but this problem is making it hard to debug other errors as it's giving me false positives.