return empty array on error