handling the user errors state