diff --git a/ghost/core/core/server/data/importer/email-template.js b/ghost/core/core/server/data/importer/email-template.js
index a425736c2fa..a45853aec7c 100644
--- a/ghost/core/core/server/data/importer/email-template.js
+++ b/ghost/core/core/server/data/importer/email-template.js
@@ -1,4 +1,4 @@
-module.exports = ({result, siteUrl, postsUrl, emailRecipient}) => `
+module.exports = ({result, siteUrl, postsUrl, emailRecipient}) => \`
@@ -54,7 +54,7 @@ module.exports = ({result, siteUrl, postsUrl, emailRecipient}) => `
}
table[class=body] p[class=small],
table[class=body] a[class=small] {
- font-size: 12x !important;
+ font-size: 12px !important;
}
}
/* -------------------------------------
@@ -122,27 +122,32 @@ module.exports = ({result, siteUrl, postsUrl, emailRecipient}) => `
|
- ${result?.data?.errors ? 'Import unsuccessful' : 'Your content import has finished successfully'}
+ \${result?.data?.errors ? 'Import unsuccessful' : 'Your content import has finished successfully'}
|
- ${result?.data?.errors ? `
+ \${result?.data?.errors ? \`
- | One or more error occured while importing your content. Please contact support or report on the Ghost Community Forum. |
+
+ \${result.data.errors[0]?.message
+ ? \`The following error occurred while importing your content: \${result.data.errors[0].message}.\`
+ : 'One or more errors occurred while importing your content.'}
+ Please contact support or report on the Ghost Community Forum.
+ |
- ` : `
+ \` : \`
|
- View posts
+ View posts
|
- `}
+ \`}
|
|
@@ -159,5 +164,4 @@ module.exports = ({result, siteUrl, postsUrl, 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 {