diff --git a/lib/sync.js b/lib/sync.js index 86e42ebb742..7ec080ae65e 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -519,8 +519,9 @@ SyncApi.prototype._sync = function(syncOptions) { self._processSyncResponse(syncToken, data); } catch (e) { - console.error("Caught /sync error:"); - console.error(e); + // log the exception with stack if we have it, else fall back + // to the plain description + console.error("Caught /sync error", e.stack || e); } // emit synced events