added api_error to get_meta_name_for method