I am having a (recent) issue with flows, especially after copying them and ending up with an invalid connection.
We are authenticating users via an API Key.
The API key is tied to an oauth connection to a dynamics 365 instance saved in another System.
There are a lot of MS-Dynamic-Values in swagger pulling in data for both the designer and the actual flow from that external d365 connection.
When copying a flow, the old api key is sometimes accidently reused and the connection therefore becomes invalid.
As a result, the designer obviously doesnt resolve the MS-Dynamics-Values anymor. Running the flow then is ending up with a rather weird error message hiding the actual reason:
ResponseSwaggerSchemaValidationFailure
The API 'api' returned an invalid response for workflow operation 'Who_am_I' of type 'OpenApiConnection'. Error details: 'The API operation 'WhoAmI' requires the property 'body/type' to be of type 'Object' but is of type 'String'.'
Checking insights, it seems as if the flow executes each and every MS-Dynamics-Values in the swagger file (Its definetly more than what our whoami step requires), receives a 401 on those calls, with Invalid API Key message, but then decides to swallow the whole error messages and display the above generic one, which is pretty annoying.
Is there any event, one could attach to on the ResponseSwaggerSchemaValidation, that would allow to return a proper error message or any way of getting an actual message out to the user when the Api key is invalid?
Bypassing authentication and handing back empty response objects for the method called in MS-Dynamics-Values does allow the flow to run and then return the actual 401 of the Request, but thats a pretty nasty band aid I definetly do not want to apply, if it can be helped.