Doctor Aphra Betrays Darth Vader To The Emperor
Doctor Aphra learns that you should never get in between 2 Sith Lords scheming against each other. It never ends well.
My personal opinion though, Palpatine would have been fine as well if Darth Vader died in his battle against Cylo and his creations. What he needs is strength after all. In that scenario, he would have most likely spared Aphra for her usefulness and expertise.
From – Star Wars: Darth Vader #25