You are writing the login routine for a password protected website. Give examples of specific user input errors that you might want to catch, and how you might deal with them.
This is an interview question
I answered this as follows
We should add both client side errors and server side errors.
Client side error: Check if user put nothing in username field. We can show message using javascript that “username not entered” Server side error: We can check if username does not exist in database and can throw error message. We can check if password does not match in database for entered username.
Can anyone suggest. Are these the only error we can catch?