{"record":{"id":"88a0e8023ca8dced","repo":"DioxusLabs/dioxus","slug":"resource-is-not-ready","errorCode":null,"errorMessage":"Resource is not ready","messagePattern":"Resource is not ready","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/hooks/src/use_resource.rs","lineNumber":461,"sourceCode":"            _ => Ok(self.value.map(|v| v.as_ref().unwrap())),\n        }\n    }\n}\n\nimpl<T, E> Resource<Result<T, E>> {\n    /// Convert the `Resource<Result<T, E>>` into an `Option<Result<MappedSignal<T>, MappedSignal<E>>>`\n    #[allow(clippy::type_complexity)]\n    pub fn result(\n        &self,\n    ) -> Option<\n        Result<\n            MappedSignal<T, Signal<Option<Result<T, E>>>>,\n            MappedSignal<E, Signal<Option<Result<T, E>>>>,\n        >,\n    > {\n        let value: MappedSignal<T, Signal<Option<Result<T, E>>>> = self.value.map(|v| match v {\n            Some(Ok(res)) => res,\n            _ => panic!(\"Resource is not ready\"),\n        });\n\n        let error: MappedSignal<E, Signal<Option<Result<T, E>>>> = self.value.map(|v| match v {\n            Some(Err(err)) => err,\n            _ => panic!(\"Resource is not ready\"),\n        });\n\n        match &*self.value.peek() {\n            Some(Ok(_)) => Some(Ok(value)),\n            Some(Err(_)) => Some(Err(error)),\n            None => None,\n        }\n    }\n}\n\nimpl<T> From<Resource<T>> for ReadSignal<Option<T>> {\n    fn from(val: Resource<T>) -> Self {\n        val.value.into()","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/hooks/src/use_resource.rs#L443-L479","documentation":"A Resource-backed value was accessed before its future resolved — the underlying Option was still None. This guard in the resource helpers indicates the async task producing the value has not completed yet.","triggerScenarios":"Thrown at packages/hooks/src/use_resource.rs:461 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The resource is still pending. Check its state before unwrapping: match on the resource value or use read_unchecked only after it resolves."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}