No doubt China's communist leadership and Xi have a lot to answer for their handling and not shutting down those infected sooner from travelling outside of Wuhan.
To be fair to them, when the penny dropped mid-January, they moved a helluva lot quicker than any other government has since.
mid-Dec: First pneumonia-like cases reported.
10th Jan: First death, ~40 infected to the by then novel virus designated COVID-19
22 Jan: 17 dead, 571 cases
23 Jan: Lockdown
Given they were grappling with the unknown, I'd give them a bit of slack over the first couple of weeks. Yeah, doctors on the scene suspected a contagious virus by end of December - but I'm not sure that info ever made it to Beijing.
None of the "western liberal democracies" can really claim to have been caught off guard in comparison.