{"record":{"id":"726b483a39cbaa57","repo":"clockworklabs/SpacetimeDB","slug":"attempt-to-remove-non-existent-update-callback","errorCode":null,"errorMessage":"Attempt to remove non-existent update callback","messagePattern":"Attempt to remove non-existent update callback","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/rust/src/callbacks.rs","lineNumber":181,"sourceCode":"        // but we want to assert that we actually removed a callback,\n        // we just don't want to invoke it.\n        // So we have to `let _ =`.\n        let _ = self\n            .on_delete\n            .remove(&callback_id)\n            .expect(\"Attempt to remove non-existent delete callback\");\n    }\n\n    pub(crate) fn remove_on_update(&mut self, callback_id: CallbackId) {\n        // Ugly: `impl FnMut` is `must_use`.\n        // If we don't `.expect` this, no diagnostic,\n        // but we want to assert that we actually removed a callback,\n        // we just don't want to invoke it.\n        // So we have to `let _ =`.\n        let _ = self\n            .on_update\n            .remove(&callback_id)\n            .expect(\"Attempt to remove non-existent update callback\");\n    }\n\n    fn invoke_on_insert(&mut self, ctx: &M::EventContext, row: &dyn Any) {\n        for callback in self.on_insert.values_mut() {\n            callback(ctx, row);\n        }\n    }\n\n    fn invoke_on_delete(&mut self, ctx: &M::EventContext, row: &dyn Any) {\n        for callback in self.on_delete.values_mut() {\n            callback(ctx, row);\n        }\n    }\n\n    fn invoke_on_update(&mut self, ctx: &M::EventContext, old: &dyn Any, new: &dyn Any) {\n        for callback in self.on_update.values_mut() {\n            callback(ctx, old, new);\n        }","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/sdks/rust/src/callbacks.rs#L163-L199","documentation":"Error \"Attempt to remove non-existent update callback\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at sdks/rust/src/callbacks.rs:181 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"}