# HG changeset patch # User Kim Alvefur # Date 1648130190 -3600 # Node ID a8e9949a6ad2e52f446fa3776c1c9c3fa4904f23 # Parent 5dffb85e62c491564232a9cb070bd62b49a33e5a mod_bookmarks2: Ignore failure to delete nothing (thanks Ge0rG) Attempting to delete all bookmarks when the bookmarks node does not even exist logged a fairly harmless error that we now ignore. diff -r 5dffb85e62c4 -r a8e9949a6ad2 mod_bookmarks2/mod_bookmarks2.lua --- a/mod_bookmarks2/mod_bookmarks2.lua Sat Mar 19 17:52:33 2022 +0000 +++ b/mod_bookmarks2/mod_bookmarks2.lua Thu Mar 24 14:56:30 2022 +0100 @@ -155,7 +155,12 @@ if synchronise then -- If we set zero legacy bookmarks, purge the bookmarks 2 node. module:log("debug", "No bookmark in the set, purging instead."); - return service:purge(namespace, jid, true); + local ok, err = service:purge(namespace, jid, true); + if not ok and err == "item-not-found" then + -- Nothing there already, all is well. + return true; + end + return ok, err; else return true; end