idiom
take the rap
ser castigado o culpado por algo, a menudo injustamente.
Meaning
to be punished or blamed for something, often unfairly.
Example
He **took the rap** for the team’s poor performance.
Él se llevó la culpa por el pobre desempeño del equipo.