I am completely baffled by this error.
Here is what I do (related to an onSubmit event):
But it fails between the last two print statements there, when exiting the try/catch clause:
How come? What is it that is “undefined” that it complains about?
To my eyes I am doing this exactly the same as for other form submits that I have, where no errors occur, so I have to do something different/wrong here…