From 9f692b02b8efc1342aa422326d09f173ceb53837 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 22 Oct 2020 23:35:01 -0700 Subject: [PATCH] fix anonymous feedback sending --- api/sendFeedback.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/sendFeedback.js b/api/sendFeedback.js index 246073d..3c82c6d 100644 --- a/api/sendFeedback.js +++ b/api/sendFeedback.js @@ -28,11 +28,14 @@ async function handle(req, res) { to: "matchu1993@gmail.com", from: "impress-2020-feedback@openneo.net", subject: `DTI feedback: ${contentSummary}`, - replyTo: email, + replyTo: email || undefined, text: content, }); } catch (e) { console.error(e); + if (e.response && e.response.body && e.response.body.errors) { + console.error(e.response.body.errors); + } return res.status(500).send("Error sending message, see logs"); }