mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
### 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. |
||
|---|---|---|
| .. | ||
| prisma | ||
| scripts | ||
| src | ||
| .env | ||
| .env.development | ||
| .eslintrc.cjs | ||
| .gitignore | ||
| instrumentation-client.ts | ||
| LICENSE | ||
| next.config.mjs | ||
| package.json | ||
| prisma.config.ts | ||
| tsconfig.json | ||
| vercel.json | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||