In my app, I have a screen with the following value in the OnVisible property.
UpdateContext({Loading: true, ErrorNotification: false});
Clear(Manifest);
IfError(
Collect(Manifest, PowerAutomateFlow.Run(SelectedProgram.Name).Items),
UpdateContext({ErrorNotification: true, ErrorCode: "B1"});
Clear(Manifest)
);
UpdateContext({Loading: false})
When this runs, the response from PowerAutomateFlow.Run() will be either 200 (containing an Items array) or 502 (containing a custom error object). If the response is 200, I want to perform one action; if it's 502, I want to perform another.
When 200 is returned, this code works. However, when 502 is returned, PowerApps simply throws an error at PowerAutomateFlow.Run() and doesn't perform the error actions. What am I doing wrong?