stack/apps/backend
Aman Ganapathy bea1de44a3
[Fix]: Add better and more informative error handling to email-rendering engines (#1124)
### Summary of Changes

We ran into an error on sentry when the vercel fallback and freestyle
improvements were pushed to prod. Spiking into the error handling
revealed that the errors could be more informative to enable easier
debugging.

We improve the error handling and add extra test coverage to cover the
error pathways through the code. Note that we do not test vercel sandbox
itself nor the fallback mechanism-this is because a) these will be
logged and tested in prod with the sanity test code, and b) creating a
mock vercel sandbox instance the way we have a mock freestyle server
would just slow down any tests that pass through the email rendering
pipeline, all for something thats meant to just be a fallback. However,
locally, we tested with scripts and real vercel sandbox test project to
success. Note that we also tried running the existing email-rendering
test suite with fake freestyle credentials and real vercel-sandbox
credentials (to mimic the fallback) and they passed.
2026-01-20 12:38:03 -08:00
..
prisma Rename catalog to product line (#1107) 2026-01-16 13:09:10 -08:00
scripts Speed up tests (#1063) 2025-12-28 11:25:04 -08:00
src [Fix]: Add better and more informative error handling to email-rendering engines (#1124) 2026-01-20 12:38:03 -08:00
.env Update email rendering code to use latest version of freestyle and to have a fallback with vercel sandbox (#1091) 2026-01-14 10:53:16 -08:00
.env.development Support async replicas (#1097) 2026-01-12 15:07:08 -08:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
.gitignore Migrations toolkit (#409) 2025-02-01 17:46:21 -08: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 Upgrade Prisma to v7 (#1064) 2025-12-26 08:13:34 -08:00
package.json [Fix]: Add better and more informative error handling to email-rendering engines (#1124) 2026-01-20 12:38:03 -08:00
prisma.config.ts Upgrade Prisma to v7 (#1064) 2025-12-26 08:13:34 -08:00
tsconfig.json fix flaky typecheck test (#1072) 2025-12-17 12:26:12 -08:00
vercel.json Update vercel.json 2025-12-16 12:02:11 -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