O tipo subjacente a enum e o objeto devem ser do mesmo tipo ou objeto deve ser um String. O tipo transmitido foi 'X'; o tipo subjacente a enum era 'Y'.
Click to search this error in Google
English version
Enum underlying type and the object must be same type or object must be a String. Type passed in was 'X'; the enum underlying type was 'Y'.