diff --git a/lib/extensions.js b/lib/extensions.js index 2ab8a789..256149e7 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -46,7 +46,7 @@ module.exports = function(realmConstructor) { return new Promise((resolve, reject) => { realmConstructor._waitForDownload(config, (error) => { if (error) { - reject(new Error("Cannot asynchronously open synced Realm, because the associated session previously experienced a fatal error")); + reject(error); } let syncedRealm = new realmConstructor(config); @@ -58,7 +58,7 @@ module.exports = function(realmConstructor) { openAsync(config, callback) { realmConstructor._waitForDownload(config, (error) => { if (error) { - callback(new Error("Cannot asynchronously open synced Realm, because the associated session previously experienced a fatal error")); + callback(error); } let syncedRealm = new realmConstructor(config);