How to get error message when user can't login? e.g. email wasn't verified

So, this is my code:

mc:loginUser(email, crypto.digest( crypto.md4, password), function( event ) print( event.result ) -- when user email wasn't verified, I want to get the error native.showAlert("Feedback",event.result, {"OK"}) --and show it to the user end) 

I’m trying to get the error message and show it to user …

However, the problem is that event.result is an empty variable when the user isn’t logged in. Which is the variable to get the message that show error when logging in? Thank you :slight_smile:

EDIT : The same thing with method registerUser, when the user already existed, how to tell the client (code line 3) that the user is already existed?