{"record":{"id":"90694fad77c37610","repo":"clockworklabs/SpacetimeDB","slug":"unable-to-decode-args","errorCode":null,"errorMessage":"unable to decode args","messagePattern":"unable to decode args","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bindings/src/rt.rs","lineNumber":54,"sourceCode":"}\n\nimpl<T> IntoVec<T> for Option<T> {\n    fn into_vec(self) -> Vec<T> {\n        self.into_iter().collect()\n    }\n}\n\n/// The `sender` invokes `reducer` at `timestamp` and provides it with the given `args`.\n///\n/// Returns an invalid buffer on success\n/// and otherwise the error is written into the fresh one returned.\npub fn invoke_reducer<'a, A: Args<'a>>(\n    reducer: impl Reducer<'a, A>,\n    ctx: &ReducerContext,\n    args: &'a [u8],\n) -> Result<(), Box<str>> {\n    // Deserialize the arguments from a bsatn encoding.\n    let SerDeArgs(args) = bsatn::from_slice(args).expect(\"unable to decode args\");\n\n    reducer.invoke(ctx, args)\n}\n\npub fn invoke_procedure<'a, A: Args<'a>, Ret: IntoProcedureResult>(\n    procedure: impl Procedure<'a, A, Ret>,\n    ctx: &mut ProcedureContext,\n    args: &'a [u8],\n) -> ProcedureResult {\n    // Deserialize the arguments from a bsatn encoding.\n    let SerDeArgs(args) = bsatn::from_slice(args).expect(\"unable to decode args\");\n\n    let res = procedure.invoke(ctx, args);\n\n    res.to_result()\n}\n\n/// A trait for types representing the *execution logic* of a reducer.","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings/src/rt.rs#L36-L72","documentation":"Error \"unable to decode args\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings/src/rt.rs:54 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"}