An error made by a court may be subject to the harmless error doctrine of Chapman v. California, 386 U.S. 18 (1967).
If the error is of constitutional magnitude, the government must prove beyond a reasonable doubt that the error was harmless. Delaware v. Van Arsdall, 475 U.S. 673, 681 (1986).
When the error is constitutional in nature and implicates a "structural" right so basic to a fair trial that, by definition, it can never be harmless, the error is deemed harmful per se. Chapman, 386 U.S. at 23 & n.8.