diff --git a/CodePush.js b/CodePush.js index 253e1c9..72aa6e1 100644 --- a/CodePush.js +++ b/CodePush.js @@ -354,7 +354,11 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg const dialogButtons = [{ text: null, onPress: async () => { - resolve(await doDownloadAndInstall()); + try { + resolve(await doDownloadAndInstall()); + } catch (downloadError) { + reject(downloadError); + } } }]; @@ -451,4 +455,4 @@ if (NativeCodePush) { log("The CodePush module doesn't appear to be properly installed. Please double-check that everything is setup correctly."); } -module.exports = CodePush; \ No newline at end of file +module.exports = CodePush;