It is justified because there has been a guilty plea.
I may be a little naive, but my understanding of a judicial error is that there was a major, fatal error in the case. Here, I understand that the mistake would come from the individual who pleaded guilty and should not have pleaded guilty. Did I understand correctly?