From d82cfb1d57ffb9b07165e2c7dc583d52d5058272 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Fri, 2 Dec 2022 16:12:24 +0530 Subject: [PATCH] Updated static error message on debug screen refs https://github.com/TryGhost/Team/issues/2327 - updates major error message on email debug screen from the email model --- ghost/admin/app/components/posts/debug.hbs | 4 ++-- ghost/admin/app/components/posts/debug.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ghost/admin/app/components/posts/debug.hbs b/ghost/admin/app/components/posts/debug.hbs index 158f18103a..b667a57d6d 100644 --- a/ghost/admin/app/components/posts/debug.hbs +++ b/ghost/admin/app/components/posts/debug.hbs @@ -43,8 +43,8 @@
{{svg-jar "warning"}}
-

Major error

-

This is the explanation of what happened.

+

Something went wrong!

+

{{this.emailError.message}}

diff --git a/ghost/admin/app/components/posts/debug.js b/ghost/admin/app/components/posts/debug.js index 7289f23bac..7740a19489 100644 --- a/ghost/admin/app/components/posts/debug.js +++ b/ghost/admin/app/components/posts/debug.js @@ -19,6 +19,14 @@ export default class Debug extends Component { return this.args.post; } + get emailError() { + if (this.post.email?.error) { + return { + message: this.post.email.error + } + } + } + get emailSettings() { return { statusClass: this.post.email?.status, @@ -68,6 +76,9 @@ export default class Debug extends Component { return { id: failure.id, code: failure.code, + failedAt: failure.failed_at ? moment(failure.failed_at).format('DD MMM, YYYY, HH:mm:ss') : '', + processedAt: failure.email_recipient.processed_at ? moment(failure.email_recipient.processed_at).format('DD MMM, YYYY, HH:mm:ss') : '', + batchId: failure.email_recipient.batch_id, enhancedCode: failure.enhanced_code, message: failure.message, recipient: {