I have a Flow setup to execute a stored procedure on a SQL box. I have a parrallel action to display the error from the SP should it return bad data or the user inputs something that isn't support by the SP example:
DECLARE @output VARCHAR(500) = 'HardarePattern cannot begin with wildcards (%, _, )'
When the flow executes the SP from the PowerApp, it returns the data to the data table without any issues, however, when the flow fails and goes to the failure action, it doesn't display the error from the SP, but instead just a generic "The data returned is invalid" in the red box in the PowerApp. Is there a way to get the actual SP error to return rather than the canned "The data returned is invalid"?
Could you please share a screenshot about your flow's configuration?
Do you configure a Parallel action to handle the "Execute stored procedure" action failure?
Do you want to return the actual "Execute stored procedure" action error message back to your app?
I agree with your thought almost. If you want to return the actual "Execute stored procedure" action error message back to your app, I afraid that there is no way to achieve your needs in Microsoft Flow currently.
Currently, within PowerApps, there is no action/solution supported to capture the error message of a action within a flow.
If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum: