hvglcs
hvglcs15mo ago

How to trigger the 'On Error' event in a button?

Hello everyone I am a beginner, i am trying to implement the login functionality. How can I trigger the 'on error' event to display an error message when a user fails to log in ? (not a hardcoded message) Thanks so much
No description
No description
8 Replies
rubenf
rubenf15mo ago
your script must throw an error 🙂
hvglcs
hvglcs15mo ago
I have thrown an error (in my script), but it still doesn't trigger the 'on event', is there any documentation for it? I couldn't find it 😦
rubenf
rubenf15mo ago
It might be a bug, I will investigate asap (likely tomorrow)
rubenf
rubenf15mo ago
the naive case seems to work:
No description
rubenf
rubenf15mo ago
Ah your message is empty so of course it won't display anything 🙂
hvglcs
hvglcs15mo ago
I understand your point, I will double-check, please wait for a moment 🙂 it worked, thank you very much. Can I retrieve the message from the error?
rubenf
rubenf15mo ago
the error is in the component output
hvglcs
hvglcs15mo ago
Okay, I understand. Thank you 👍