Update code to trait the exception when we have a java script error.