catch and report the error instead of throwing an exception

This commit is contained in:
or-else
2018-05-10 17:08:44 -07:00
parent 189fc0e3f2
commit ed11dd0d22
+3 -2
View File
@@ -4076,8 +4076,9 @@
handleSearchContacts: function(query) {
var fnd = Tinode.getFndTopic();
var instance = this;
fnd.setMeta({desc: {private: query}}).then(function(ctrl) {
fnd.getMeta(fnd.startMetaQuery().withSub().withLaterDesc().build());
fnd.setMeta({desc: {private: query}})
.then(function(ctrl) {
return fnd.getMeta(fnd.startMetaQuery().withSub().withLaterDesc().build());
}).catch(function(err){
instance.handleError(err.message, "err");
});