Better error messages on JS fail