Update js error check