{"record":{"id":"ffc4c4deb149efdf","repo":"bevyengine/bevy","slug":"this-untypedhandle-is-for-found-and-cannot-be","errorCode":null,"errorMessage":"This UntypedHandle is for {found:?} and cannot be converted into a Handle<{expected:?}>","messagePattern":"This UntypedHandle is for (.+?) and cannot be converted into a Handle<(.+?)>","errorType":"exception","errorClass":"UntypedAssetConversionError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/handle.rs","lineNumber":725,"sourceCode":"    ($uuid:expr) => {{\n        $crate::Handle::Uuid($crate::uuid::uuid!($uuid), ::core::marker::PhantomData)\n    }};\n}\n\n#[deprecated = \"Use uuid_handle! instead\"]\n#[macro_export]\nmacro_rules! weak_handle {\n    ($uuid:expr) => {\n        $crate::uuid_handle!($uuid)\n    };\n}\n\n/// Errors preventing the conversion of to/from an [`UntypedHandle`] and a [`Handle`].\n#[derive(Error, Debug, PartialEq, Clone)]\n#[non_exhaustive]\npub enum UntypedAssetConversionError {\n    /// Caused when trying to convert an [`UntypedHandle`] into a [`Handle`] of the wrong type.\n    #[error(\n        \"This UntypedHandle is for {found:?} and cannot be converted into a Handle<{expected:?}>\"\n    )]\n    TypeIdMismatch {\n        /// The expected [`TypeId`] of the [`Handle`] being converted to.\n        expected: TypeId,\n        /// The [`TypeId`] of the [`UntypedHandle`] being converted from.\n        found: TypeId,\n    },\n}\n\n#[cfg(test)]\nmod tests {\n    use alloc::boxed::Box;\n    use bevy_platform::hash::FixedHasher;\n    use bevy_reflect::{FromReflect, PartialReflect};\n    use core::hash::BuildHasher;\n    use uuid::Uuid;\n","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_asset/src/handle.rs#L707-L743","documentation":"UntypedAssetConversionError: an attempt was made to convert an UntypedHandle into a Handle<A> whose asset type does not match the type the untyped handle was created for. The error carries the found and expected type names to identify the mismatch.","triggerScenarios":"Thrown at crates/bevy_asset/src/handle.rs:725 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Convert to the correct Handle<A> matching the untyped handle's actual asset type (shown as `found` in the error)","Match on the asset's type id or use the loader's known output type before converting","Handle the Err case of try_typed-like conversions instead of assuming the type"],"exampleFix":null,"handlingStrategy":"type-guard","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"}