Can use function to get enum error messages