hey guys,
Does anyone know how does the exceptions raised in the login.py / auth.py work ?
I need to raise an exception before the login happens, and on some condition, prevent the login .
I used this call in a whitelisted python func
frappe.throw(_("Message"), frappe.AuthenticationError)
But this doesn’t seem to work. I also tried sys.exit()
and raise SystemExit
but with no success. They just raise the exception and print the traceback in the console.
Any suggestions ?
Thanks,
Akarsh