adding js error handling so we can see client side errors