Taking the rap is a phrase commonly used to describe taking responsibility for something that went wrong or for a mistake that was made. There are a number of different synonyms that can be used to convey the same meaning. One possible alternative is "accepting the blame." This phrase is often used in a more formal setting, such as in a professional workplace or in legal situations. Another possible synonym is "shouldering the burden." This phrase tends to emphasize the weight or difficulty of the responsibility being taken on. Other possibilities include "falling on one's sword" or "bearing the brunt".