How to change custom state when error message displays on login?

On the login modal, when a user clicks “log in” I set a custom state for logging-in = yes, and have the button conditionally show the words “logging in…” with a spinning cog as a loading icon on the left. This is a good feedback mechanism to let the user know we’re logging them in (since it takes a few seconds).

However, when the user types in, say, the wrong password, they get an error message. It does not, however, change my custom state back to “no” so the but still saying “logging in…”. This can confuse users.

Is there any way for me to set this condition back to “no” if the user types in the wrong password? …and, still have the bubble error message appear so the user knows it was their password that was the problem.


Use workflow on error and then change state

Hmmm, when I do that the error message doesn’t show up though. Am I missing something?

Yes. Since your manually handling the error you have to capture in the error workflow and display the message your self


Got it. Is there a way to know which error happened, so that I can publish an appropriate message?

Yes there are 2 parts of the error workflow

1 is the code
2 is the message

1 Like