Definitions of rap
(informal) a criminal charge (=a statement accusing someone of a crime)
It's a bum rap (=false accusation).
a punishment that is given to someone found guilty of committing a crime
Hope told police he would not "take the rap" for something he did not do.
strong criticism
We're having to take the rap for the government's bad planning.