Uncaught TypeError between two print statements - what is going on?

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…

I keep solving problems of my own creation today…! The Snackbar referenced in the screenshot above was actually not there in the component layout - don’t know how it got to remove itself, as I have for sure not removed it. Anyhow, adding the component again, then updating all references, and the problem goes away…! :person_shrugging: