[hshan] Fix bug of error setting logic