At a minimum Bergdahl should face a long prison term. If his desertion lead to an attack he should be EXECUTED.
A very long term; he's could be a "Manchurian Candidate."