diff --git a/src/appstore.js b/src/appstore.js index e59864c8d..1e8af444e 100644 --- a/src/appstore.js +++ b/src/appstore.js @@ -351,8 +351,8 @@ async function downloadIcon(appStoreId, version) { .timeout(60 * 1000) .ok(() => true)); - if (networkError) throw new BoxError(BoxError.NETWORK_ERROR, Object.assign(networkError, { message: 'Downloading icon' })); - if (response.status !== 200) return; // ignore error. this can also happen for apps installed with cloudron-cli + if (networkError) throw new BoxError(BoxError.NETWORK_ERROR, `Network error downloading icon: ${networkError.message}`); + if (response.status !== 200) throw new BoxError(BoxError.EXTERNAL_ERROR, `Icon download failed. ${response.status} ${JSON.stringify(response.body)}`); const contentType = response.headers['content-type']; if (!contentType || contentType.indexOf('image') === -1) throw new BoxError(BoxError.EXTERNAL_ERROR, 'AppStore returned invalid icon for app'); diff --git a/src/apptask.js b/src/apptask.js index 3538e3d4f..26895a719 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -199,8 +199,7 @@ async function verifyManifest(manifest) { async function downloadIcon(app) { assert.strictEqual(typeof app, 'object'); - // nothing to download if we dont have an appStoreId - if (!app.appStoreId) return; + if (!app.appStoreId) return; // nothing to download if we dont have an appStoreId debug(`downloadIcon: Downloading icon of ${app.appStoreId}@${app.manifest.version}`);