Return error 2 if the specified hash_name is invalid