Added support to display the error with javascript