Look, any President has the right to make a judgment call that it is better to let four Americans die than risk the lives of dozens of others trying to save them. The key is to investigate the motivations for doing so, and if they are primarily political in nature, to bring
shame upon the malefactor and his Party for the next several election cycles for making such a cynical decision.
Talk of "prosecution" is idiotic - we elect Presidents to make decisions like this in military situations. If we don't like his decision, we un-elect him.
Part of the point is to punish the enemy.
Neither arming Jihadists nor letting them run roughshod over the US is a good idea in the long run.