{"record":{"id":"87ad62db17efd813","repo":"wasmerio/wasmer","slug":"payload-length-mismatch","errorCode":null,"errorMessage":"payload length mismatch","messagePattern":"payload length mismatch","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/backend/sys/entities/exception.rs","lineNumber":33,"sourceCode":"    exnref: wasmer_vm::VMExceptionRef,\n}\n\nimpl Exception {\n    /// Creates a new exception with the given tag and payload, and also creates\n    /// a reference to it, returning the reference.\n    #[allow(irrefutable_let_patterns)]\n    pub fn new(store: &mut impl AsStoreMut, tag: &crate::sys::tag::Tag, payload: &[Value]) -> Self {\n        if !tag.is_from_store(store) {\n            panic!(\"cannot create Exception with Tag from another Store\");\n        }\n\n        let store_objects = store.as_store_ref().objects().as_sys();\n        let store_id = store_objects.id();\n\n        let tag_ty = tag.handle.get(store_objects).signature.params();\n\n        if tag_ty.len() != payload.len() {\n            panic!(\"payload length mismatch\");\n        }\n\n        let values = payload\n            .iter()\n            .enumerate()\n            .map(|(i, v)| {\n                if v.ty() != tag_ty[i] {\n                    panic!(\"payload type mismatch\");\n                }\n                v.as_raw(store)\n            })\n            .collect::<Vec<_>>()\n            .into_boxed_slice();\n\n        let ctx = store.objects_mut().as_sys_mut();\n        let exception = wasmer_vm::VMExceptionObj::new(tag.handle.internal_handle(), values);\n        let exn_handle = wasmer_vm::StoreHandle::new(ctx, exception);\n        let exnref = wasmer_vm::VMExceptionRef(exn_handle);","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/backend/sys/entities/exception.rs#L15-L51","documentation":"Error \"payload length mismatch\" thrown in wasmerio/wasmer.","triggerScenarios":"Thrown at lib/api/src/backend/sys/entities/exception.rs:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}