mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed content importer email on errors
no refs. - the content importer didn't send emails on unhandled errors
This commit is contained in:
parent
48a47a8289
commit
b0ac096d94
1 changed files with 2 additions and 1 deletions
|
@ -439,6 +439,7 @@ class ImportManager {
|
||||||
logging.error(`Content import was unsuccessful`, {
|
logging.error(`Content import was unsuccessful`, {
|
||||||
error: err
|
error: err
|
||||||
});
|
});
|
||||||
|
importResult = {data: {errors: [err]}};
|
||||||
} finally {
|
} finally {
|
||||||
// Step 5: Cleanup any files
|
// Step 5: Cleanup any files
|
||||||
await this.cleanUp();
|
await this.cleanUp();
|
||||||
|
@ -451,7 +452,7 @@ class ImportManager {
|
||||||
});
|
});
|
||||||
await ghostMailer.send({
|
await ghostMailer.send({
|
||||||
to: importOptions.user.email,
|
to: importOptions.user.email,
|
||||||
subject: importResult.data?.errors
|
subject: importResult?.data?.errors
|
||||||
? 'Your content import was unsuccessful'
|
? 'Your content import was unsuccessful'
|
||||||
: 'Your content import has finished',
|
: 'Your content import has finished',
|
||||||
html: email
|
html: email
|
||||||
|
|
Loading…
Add table
Reference in a new issue