{"record":{"id":"b17523b959fc2cdb","repo":"clockworklabs/SpacetimeDB","slug":"failed-to-serialize-procedure-result","errorCode":null,"errorMessage":"Failed to serialize procedure result","messagePattern":"Failed to serialize procedure result","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bindings/src/rt.rs","lineNumber":233,"sourceCode":"    fn into_result(self) -> Result<(), Box<str>> {\n        Ok(self)\n    }\n}\nimpl<E: fmt::Display> IntoReducerResult for Result<(), E> {\n    #[inline]\n    fn into_result(self) -> Result<(), Box<str>> {\n        self.map_err(|e| e.to_string().into())\n    }\n}\n\n#[diagnostic::on_unimplemented(\n    message = \"The procedure return type `{Self}` does not implement `SpacetimeType`\",\n    note = \"if you own the type, try adding `#[derive(SpacetimeType)]` to its definition\"\n)]\npub trait IntoProcedureResult: SpacetimeType + Serialize {\n    #[inline]\n    fn to_result(&self) -> ProcedureResult {\n        bsatn::to_vec(&self).expect(\"Failed to serialize procedure result\")\n    }\n}\nimpl<T: SpacetimeType + Serialize> IntoProcedureResult for T {}\n\n#[diagnostic::on_unimplemented(\n    message = \"the first argument of a reducer must be `&ReducerContext`\",\n    label = \"first argument must be `&ReducerContext`\"\n)]\npub trait ReducerContextArg {\n    // a little hack used in the macro to make error messages nicer. it generates <T as ReducerContextArg>::_ITEM\n    #[doc(hidden)]\n    const _ITEM: () = ();\n}\nimpl ReducerContextArg for &ReducerContext {}\n\n/// A trait of types that can be an argument of a reducer.\n#[diagnostic::on_unimplemented(\n    message = \"the reducer argument `{Self}` does not implement `SpacetimeType`\",","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings/src/rt.rs#L215-L251","documentation":"Error \"Failed to serialize procedure result\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings/src/rt.rs:233 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":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}