The submit handler throws an uncaught TypeError. The page listens on window.error, sends the failed code and inputs to the model, and asks it to return what the function should have returned.
TypeError
window.error