Aegon II had the rat catchers in King’s Landing hanged after Blood and Cheese murdered Jaehaerys, as a mass punishment for the killing.

What happened

In the lore, Aegon’s order was not a single execution of one rat catcher, but the hanging of all the rat catchers in the city.

That’s why people often describe it as a brutal collective reprisal rather than a targeted sentence.

Why he did it

He ordered it in fury after his son’s death, even though the real attackers were Blood and Cheese, not the ordinary rat catchers.

The choice also fits the grim, retaliatory tone of the Blood and Cheese aftermath in House of the Dragon and Fire & Blood.

Book vs show

In the book tradition, Cheese’s fate is left unclear, while Blood is captured and later dies under torture.

The show emphasizes the revenge angle by showing Aegon’s sweeping punishment of the rat catchers after the murder.

Plain answer

So the rat catchers were executed by hanging.