I am using action().unitCommand to attempt to build a structure. If I don't have the resources to build it I would expect an ActionError with the ActionResult.NOT_ENOUGH_MINERALS to be returned. I get no error even though the red test shows onscreen, I check both after actions are sent within the same update and at the beginning of the next update for so I should not be missing it.
As a side note it may be more useful to have these as a method like onStep that gets called instead of a list you have to get.