Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

fix(scripts): ignore bouncing accounts in verification reminders #3010

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions scripts/verification-reminders.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,19 @@ async function run () {
});
sent[uid] = true;
} catch (err) {
if (err.errno === error.ERRNO.ACCOUNT_UNKNOWN) {
console.log(` * ignoring deleted account ${uid}`);
} else {
console.log(` * failed ${uid}`);
console.error(err.stack);
failed.push({ timestamp, uid });
const { errno } = err;
switch (errno) {
case error.ERRNO.ACCOUNT_UNKNOWN:
case error.ERRNO.BOUNCE_COMPLAINT:
case error.ERRNO.BOUNCE_HARD:
case error.ERRNO.BOUNCE_SOFT:
console.log(` * ignoring deleted/bouncing account ${uid}, errno: ${errno}`);
await verificationReminders.delete(uid);
break;
default:
console.log(` * failed ${uid}, errno: ${errno}`);
console.error(err.stack);
failed.push({ timestamp, uid });
}
}

Expand Down