{"record":{"id":"b4c6b22b177c21f4","repo":"bevyengine/bevy","slug":"this-untypedassetid-is-for-found-and-cannot-be","errorCode":null,"errorMessage":"This UntypedAssetId is for {found:?} and cannot be converted into an AssetId<{expected:?}>","messagePattern":"This UntypedAssetId is for (.+?) and cannot be converted into an AssetId<(.+?)>","errorType":"exception","errorClass":"UntypedAssetIdConversionError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/id.rs","lineNumber":474,"sourceCode":"impl From<ErasedAssetIndex> for UntypedAssetId {\n    fn from(value: ErasedAssetIndex) -> Self {\n        Self::Index {\n            type_id: value.type_id,\n            index: value.index,\n        }\n    }\n}\n\n#[derive(Error, Debug)]\n#[error(\"Attempted to create a TypedAssetIndex from a Uuid\")]\npub(crate) struct UuidNotSupportedError;\n\n/// Errors preventing the conversion of to/from an [`UntypedAssetId`] and an [`AssetId`].\n#[derive(Error, Debug, PartialEq, Clone)]\n#[non_exhaustive]\npub enum UntypedAssetIdConversionError {\n    /// Caused when trying to convert an [`UntypedAssetId`] into an [`AssetId`] of the wrong type.\n    #[error(\"This UntypedAssetId is for {found:?} and cannot be converted into an AssetId<{expected:?}>\")]\n    TypeIdMismatch {\n        /// The [`TypeId`] of the asset that we are trying to convert to.\n        expected: TypeId,\n        /// The [`TypeId`] of the asset that we are trying to convert from.\n        found: TypeId,\n    },\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    type TestAsset = ();\n\n    const UUID_1: Uuid = Uuid::from_u128(123);\n    const UUID_2: Uuid = Uuid::from_u128(456);\n\n    /// Simple utility to directly hash a value using a fixed hasher","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_asset/src/id.rs#L456-L492","documentation":"UntypedAssetIdConversionError variant: converting an UntypedAssetId into an AssetId<A> failed because the untyped id's stored type is `found`, not the requested `expected` type A. Same class of mismatch as the handle conversion error, but for ids.","triggerScenarios":"Thrown at crates/bevy_asset/src/id.rs:474 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request the AssetId for the actual asset type stored in the UntypedAssetId","Check UntypedAssetId::type_id() before converting when the type is not statically known","Use try_typed() and react to the returned error rather than 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-14T00:17:10.932Z"}