checks if there are some errors, if not then the window error will
not be shown