1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Emit sync errors for capturing by clients

For https://github.com/vector-im/riot-web/issues/9260
This commit is contained in:
Travis Ralston
2019-03-22 20:19:08 -06:00
parent bb1cd2bbce
commit 7168f76614

View File

@@ -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