Hi
I have been trying to obtain the same thing, just simply getting the error message in flow, and sending it to myself.
I found it can be done using the actions() function.
In your case the argument of the action function would be 'Create_file' since that is the name of the component you want to monitor.
It will return an object somewhat like this example of: actions('Set_variable_3')
{
"name": "Set_variable_3",
"startTime": "2019-09-09T19:46:51.4123218Z",
"endTime": "2019-09-09T19:46:51.4123218Z",
"trackingId": "53a0681f-7810-4bbe-9494-a5cdcdeadb0b",
"clientTrackingId": "08586335800123686594686241510CU42",
"clientKeywords": [
"testFlow"
],
"code": "BadRequest",
"status": "Failed",
"error": {
"code": "InvalidTemplate",
"message": "Unable to process template language expressions in action 'Set_variable_3' inputs at line '1' and column '2677': 'The template language expression 'actions('conversion_to_currency').outputs.body.status' cannot be evaluated because property 'status' doesn't exist, available properties are 'name, value'. Please see https://aka.ms/logicexpressions for usage details.'."
}
}So in my case the name of the component I monitored was 'Set_variable_3' .
Now in order for you to get just the error message you can say: actions('Create_file').error.message
If you want to check first if the action failed or succeeded you can check the status: actions('Create_file').status
You can use these as arguments in the SQL 'Create_Failure_Event' component to store the error message if any.
Or you use these to fire a terminate component that matches the status
Best regards,
Michel