Only set error if we have one

Avoids displaying the error box with no errors