js errors finally handled