{"record":{"id":"dbf60d03a248b618","repo":"bevyengine/bevy","slug":"variant-with-name-variant-name-does-not-exist","errorCode":null,"errorMessage":"variant with name `{variant_name}` does not exist on enum `{enum_name}`","messagePattern":"variant with name `(.+?)` does not exist on enum `(.+?)`","errorType":"exception","errorClass":"ApplyError","httpStatus":null,"severity":"error","filePath":"crates/bevy_reflect/src/reflect.rs","lineNumber":61,"sourceCode":"    MismatchedTypes {\n        /// Type of the value we attempted to apply.\n        from_type: Box<str>,\n        /// Type we attempted to apply the value to.\n        to_type: Box<str>,\n    },\n\n    #[error(\"attempted to apply type with {from_size} size to a type with {to_size} size\")]\n    /// Attempted to apply an [array-like] type to another of different size, e.g. a [u8; 4] to [u8; 3].\n    ///\n    /// [array-like]: crate::array::Array\n    DifferentSize {\n        /// Size of the value we attempted to apply, in elements.\n        from_size: usize,\n        /// Size of the type we attempted to apply the value to, in elements.\n        to_size: usize,\n    },\n\n    #[error(\"variant with name `{variant_name}` does not exist on enum `{enum_name}`\")]\n    /// The enum we tried to apply to didn't contain a variant with the give name.\n    UnknownVariant {\n        /// Name of the enum.\n        enum_name: Box<str>,\n        /// Name of the missing variant.\n        variant_name: Box<str>,\n    },\n\n    #[error(transparent)]\n    /// A value could not be converted to its dynamic representation via\n    /// [`PartialReflect::to_dynamic`] while applying it.\n    CloneError(#[from] ReflectCloneError),\n}\n\nimpl From<ReflectKindMismatchError> for ApplyError {\n    fn from(value: ReflectKindMismatchError) -> Self {\n        Self::MismatchedKinds {\n            from_kind: value.received,","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_reflect/src/reflect.rs#L43-L79","documentation":"ApplyError::MissingVariant — try_apply on enums found the source's variant name does not exist on the destination enum type. Payloads: variant_name and enum_name. Apply values whose variant is defined on the target enum (or use patching with dynamic enums).","triggerScenarios":"Thrown at crates/bevy_reflect/src/reflect.rs:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a variant name that exists on the enum","Add the missing variant to the enum definition","Fix typos in the variant name"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}