add detect error and js document