Show the error message only if the error actually occurred.