Error handling for new PowerShell activity in Flow Designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 10:00 PM
Hi There
I'm having trouble understanding the best way to set up error handling for a new powershell activity i have created in Flow Designer.
The activity creates a new shared mailbox on the on prem o365 server. Regardless of whether it fails or succeeds, the flow designer activity returns "Success"
In the logs you can see the error, and in the step output data it will show that it failed, but i haven't been able to figure out how to evaluate either of those in the activity for error handling purposes.
I tried 'step status' -> 'message' but that didn't get me anywhere
what should I be doing differently? i'd like it to return an error if the powershell fails for some reason (most likely this very scenario, where email / name is in use already) so the rest of the flow can act accordingly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 06:17 PM
ok this was basically just me being a noob. in case anyone else needs this info:
rather than trying to get it to evaluate errors, i went the other way and had a look at the success output. in the powershell step -> output, there is more data being sent out when it succeeds than when it fails. So I set the error evaluation to look for the absence of some data that it only spits out when it succeeds, and then evaluate that as a failure.