catch async exceptions and write out the error message into the html page. this solution would be easier than sending it back to jupyter