diff --git a/ghost/core/core/server/data/importer/email-template.js b/ghost/core/core/server/data/importer/email-template.js index a425736c2fa..bc529979664 100644 --- a/ghost/core/core/server/data/importer/email-template.js +++ b/ghost/core/core/server/data/importer/email-template.js @@ -1,163 +1,20 @@ -module.exports = ({result, siteUrl, postsUrl, emailRecipient}) => ` - - - - - - Your content import is complete - - - - - - - - - -
  -
- - - - - - - - - - - - - - -
- - - - - - - - ${result?.data?.errors ? ` - - - - ` : ` - - - - `} -
-

${result?.data?.errors ? 'Import unsuccessful' : 'Your content import has finished successfully'}

-
One or more error occured while importing your content. Please contact support or report on the Ghost Community Forum.
- View posts -
-
- -
- + return 'Your content import has finished successfully'; +})()} - -
-
 
- - -`; +[Ghost Community Forum](https://forum.ghost.org/) +[View posts](${postsUrl.href}) +This email was sent from [${siteUrl.host}](${siteUrl.href}) to [${emailRecipient}](mailto:${emailRecipient}) diff --git a/ghost/core/core/server/data/importer/importers/data/data-importer.js b/ghost/core/core/server/data/importer/importers/data/data-importer.js index bcc91500ff2..95fff79e841 100644 --- a/ghost/core/core/server/data/importer/importers/data/data-importer.js +++ b/ghost/core/core/server/data/importer/importers/data/data-importer.js @@ -186,7 +186,8 @@ DataImporter = { // Errors preventing import: if (errors.length > 0) { debug(errors); - throw errors; + // Rejections should always be with an Error object, not an array + throw errors[0]; } return {