adding error to abort JS