Skip to content

Commit

Permalink
Emit sync errors for capturing by clients
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Mar 23, 2019
1 parent bb1cd2b commit 7168f76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ SyncApi.prototype._sync = async function(syncOptions) {
// 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 the exception for client handling
this.client.emit("sync.unexpectedError", e);
}

// update this as it may have changed
Expand Down

0 comments on commit 7168f76

Please sign in to comment.