From deee14611dad595924d775531a802a4665a20ea4 Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Wed, 8 Jan 2025 19:10:12 -0600 Subject: [PATCH] fix: fixed issue with hard bounces not throwing errors --- helpers/on-data-mx.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helpers/on-data-mx.js b/helpers/on-data-mx.js index b91e6baa9a..dee3c0cc55 100644 --- a/helpers/on-data-mx.js +++ b/helpers/on-data-mx.js @@ -1679,7 +1679,6 @@ async function onDataMX(session, headers, body) { ]); const accepted = []; - // TODO: figure out why hard reject not working const bounces = [...data.bounces]; const vacationResponders = []; @@ -1811,7 +1810,7 @@ async function onDataMX(session, headers, body) { err.bounces = bounces; // if lowest error code was >= 500 then don't send a bounce email notification - if (err.responseCode >= 500) return; + if (err.responseCode >= 500) throw err; // // NOTE: we might not even want to send bounces here altogether