Commit 36e56052 authored by Christoph Scholz's avatar Christoph Scholz Committed by JC Brand

don't log error if user has no bookmarks

parent 916e300a
......@@ -2,6 +2,7 @@
- #1313: Stylistic improvements to the send button
- #1793: Send button doesn't appear in Firefox in 1:1 chats
- #1822: Don't log error if user has no bookmarks
## 6.0.0 (2020-01-09)
......
......@@ -237,18 +237,19 @@ converse.plugins.add('converse-bookmarks', {
[__("The server did not return your bookmarks within the allowed time. "+
"You can reload the page to request them again.")]
);
} else {
log.error('Error while fetching bookmarks');
log.error(iq);
}
if (deferred) {
} else if (deferred) {
if (iq.querySelector('error[type="cancel"] item-not-found')) {
// Not an exception, the user simply doesn't have any bookmarks.
window.sessionStorage.setItem(this.fetched_flag, true);
return deferred.resolve();
} else {
log.error('Error while fetching bookmarks');
log.error(iq);
return deferred.reject(new Error("Could not fetch bookmarks"));
}
} else {
log.error('Error while fetching bookmarks');
log.error(iq);
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment