When code generation fails for any reason, instead of just not showing the code, display the error message to the user in the result dialog.