Skip to content

Commit

Permalink
fix: fixed issue with hard bounces not throwing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jan 9, 2025
1 parent eb99618 commit deee146
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions helpers/on-data-mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit deee146

Please sign in to comment.