stack/apps/backend
Aman Ganapathy 3f01358f9d
[Refactor] Make all SMTP 4yz Errors Retryable (#1293)
### Context
The `emails-low-level.tsx` file is where the sending logic of an email
over smtp occurs. It tries to send an email, and if there is an issue it
has logic to mark the email as retryable or not. Then, the
`email-queue-step` itself handles the actual retry efforts based on this
flag and a few other factors (like if max retries have been attempted).
Currently, if an error code isn't explicitly accounted for, it falls
back to being an "unknown error while sending" and is marked as not
retryable.
However, SMTP [defines the 4yz class of error codes as being
retryable](https://www.iana.org/assignments/smtp-enhanced-status-codes/smtp-enhanced-status-codes.xhtml).

### Summary of Changes
We add fallback logic at the end of the `responseCode` specific block to
mark the 4yz class of error codes as retryable. While the message here
is less specific, that is okay since any codes we want to explicitly
account for are handled above it. The main thing here is that these
should be retried.
2026-04-07 16:20:39 +00:00
..
prisma emu with a q stuff (#1266) 2026-04-04 00:33:52 +00:00
scripts private files n sm build shit (#1276) 2026-03-23 12:31:36 -07:00
src [Refactor] Make all SMTP 4yz Errors Retryable (#1293) 2026-04-07 16:20:39 +00:00
.env Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
.env.development New { type: "hosted" } for page URLs (#1261) 2026-03-27 14:48:01 -07:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
.gitignore private files n sm build shit (#1276) 2026-03-23 12:31:36 -07:00
instrumentation-client.ts Upgrade backend to Next.js 16 2025-12-12 16:59:07 -08:00
LICENSE Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
next.config.mjs private files n sm build shit (#1276) 2026-03-23 12:31:36 -07:00
package.json chore: update package versions 2026-03-31 10:54:12 -07:00
prisma.config.ts Upgrade Prisma to v7 (#1064) 2025-12-26 08:13:34 -08:00
tsconfig.json Fix lint 2026-02-27 09:59:26 -08:00
vercel.json External db sync (#1036) 2026-02-05 12:04:31 -08:00
vitest.config.ts Customizable ports (#962) 2025-10-20 15:24:47 -07:00
vitest.setup.ts Customizable ports (#962) 2025-10-20 15:24:47 -07:00