Sometimes kids will do bad things like; break the clothesline, spill an entire bottle of drink all over the floor, or fill the toilet with an entire roll of toilet paper and then neglect to flush it.
It’s really easy to get angry and recriminate them for it, and sometimes more. But it’s good to remember the good behavior added into that other stuff (if any) and acknowledge it.
Say thank you for being; honest, helping to cover/clean it up, stepping forwards and admitting they were wrong.
It may even be more important than getting cross and punishing them.