Updated js file to test error handling.