From 292188f605b22ff2258fe7f699a7d36e41c41dbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= <DafyddLlyr@gmail.com>
Date: Fri, 17 Nov 2023 09:17:24 +0000
Subject: [PATCH] chore: Improve email trigger error logging

---
 api.planx.uk/modules/saveAndReturn/service/utils.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api.planx.uk/modules/saveAndReturn/service/utils.ts b/api.planx.uk/modules/saveAndReturn/service/utils.ts
index f6665b8d80..aa61ee7658 100644
--- a/api.planx.uk/modules/saveAndReturn/service/utils.ts
+++ b/api.planx.uk/modules/saveAndReturn/service/utils.ts
@@ -265,7 +265,7 @@ const setupEmailEventTriggers = async (sessionId: string) => {
     return hasUserSaved;
   } catch (error) {
     throw new Error(
-      `Error setting up email notifications for session ${sessionId}`,
+      `Error setting up email notifications for session ${sessionId}. Error: ${error}`,
     );
   }
 };