From a1e52c2d7aa1b3ddda606648c059f0f08d5a2622 Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sat, 12 Jan 2019 11:20:58 +0100 Subject: [PATCH] Fix for #516 --- server/routes/sandboxed-mosaico.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/routes/sandboxed-mosaico.js b/server/routes/sandboxed-mosaico.js index 4b2f8b84..20de35de 100644 --- a/server/routes/sandboxed-mosaico.js +++ b/server/routes/sandboxed-mosaico.js @@ -22,6 +22,8 @@ const mosaicoTemplates = require('../models/mosaico-templates'); const contextHelpers = require('../lib/context-helpers'); const interoperableErrors = require('../../shared/interoperable-errors'); +const bluebird = require('bluebird'); + const { getTrustedUrl, getSandboxUrl, getPublicUrl } = require('../lib/urls'); const { base } = require('../../shared/templates'); const { AppType } = require('../../shared/app'); @@ -221,7 +223,11 @@ function getRouter(appType) { if (method === 'placeholder') { width = sanitizeSize(width, 1, 2048, 600, false); height = sanitizeSize(height, 1, 2048, 300, false); - image = await placeholderImage(width, height); + try { + image = await placeholderImage(width, height); + } catch (err) { + console.log(err); + } } else { width = sanitizeSize(width, 1, 2048, 600, false);