exception handling for find user sql query