From fb85596501be1c066d1157b1ae87f2a371ea0adc Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 29 Dec 2015 15:14:14 -0800 Subject: [PATCH] Better error description. Add a TODO to fix pin() error handling. --- static/cosmopolite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/cosmopolite.js b/static/cosmopolite.js index 61bddb3..0f7326b 100644 --- a/static/cosmopolite.js +++ b/static/cosmopolite.js @@ -294,7 +294,7 @@ Cosmopolite.prototype.subscribe = function(subjects, opt_messages, opt_lastID) { (subject['readable_only_by'] || subject['writable_only_by'])) { console.log(this.loggingPrefix_(), 'local subjects can\'t have ACLs:', subject); - reject(); + reject(new Error('Local subject with ACL')); return; } @@ -531,6 +531,7 @@ Cosmopolite.prototype.pin = function(subject, message) { }; var onSuccess = function() { + // TODO: this should check result status this.pins_[id] = args; resolve(id); };