Software /
code /
prosody-modules
Comparison
mod_bookmarks2/mod_bookmarks2.lua @ 3740:b3fb32bd1f01
mod_bookmarks2: Use the correct error when failing to retrieve bookmarks2 to reply to Private XML request.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 13 Nov 2019 16:27:50 +0100 |
parent | 3739:1ed3d86eeaed |
child | 3741:33b3e2387a10 |
comparison
equal
deleted
inserted
replaced
3739:1ed3d86eeaed | 3740:b3fb32bd1f01 |
---|---|
46 if not ok then | 46 if not ok then |
47 if ret == "item-not-found" then | 47 if ret == "item-not-found" then |
48 module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid); | 48 module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid); |
49 session.send(st.reply(stanza):add_child(query)); | 49 session.send(st.reply(stanza):add_child(query)); |
50 else | 50 else |
51 module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, id); | 51 module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); |
52 session.send(st.error_reply(stanza, "cancel", "internal-server-error", "Failed to retrive bookmarks from PEP")); | 52 session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrive bookmarks from PEP")); |
53 end | 53 end |
54 return true; | 54 return true; |
55 end | 55 end |
56 | 56 |
57 local storage = st.stanza("storage", { xmlns = "storage:bookmarks" }); | 57 local storage = st.stanza("storage", { xmlns = "storage:bookmarks" }); |