The error is handled by the wrong error here. If the user inputs valid data, but there's no internet connection, then the same invalid input window pops up. This is not correct as the user has entered valid input, and it's the connection that's the problem.