From b0ac096d94be76444d3032e26f62b4739e5db3b8 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Mon, 21 Nov 2022 13:08:35 +0100 Subject: [PATCH] Fixed content importer email on errors no refs. - the content importer didn't send emails on unhandled errors --- ghost/core/core/server/data/importer/import-manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/server/data/importer/import-manager.js b/ghost/core/core/server/data/importer/import-manager.js index 1183788b4f..8a7cbb06e3 100644 --- a/ghost/core/core/server/data/importer/import-manager.js +++ b/ghost/core/core/server/data/importer/import-manager.js @@ -439,6 +439,7 @@ class ImportManager { logging.error(`Content import was unsuccessful`, { error: err }); + importResult = {data: {errors: [err]}}; } finally { // Step 5: Cleanup any files await this.cleanUp(); @@ -451,7 +452,7 @@ class ImportManager { }); await ghostMailer.send({ to: importOptions.user.email, - subject: importResult.data?.errors + subject: importResult?.data?.errors ? 'Your content import was unsuccessful' : 'Your content import has finished', html: email