Skip to content

Fix issue where service doesn't die when it doesn't have the necessary environment variables #428

@grymmy

Description

@grymmy
     |                                                      ^
   9 |
  10 | async function sendEmailWithLoops(
  11 |     transactionEmailId: string,
 ⨯ unhandledRejection:  Error: Please set LOOPS_TRANSACTIONAL_PERSONALIZED_EMAIL_ID
    at [project]/lib/loops.ts [app-rsc] (ecmascript) (file:/Users/graham/Work/shipwrecked/lib/loops.ts:8:54)
    at <unknown> (file:/Users/graham/Work/shipwrecked/app/api/auth/%5B...nextauth%5D/route.ts:9:0)
    at [project]/app/api/auth/[...nextauth]/route.ts [app-rsc] (ecmascript) (.next/server/chunks/ssr/[root of the server]__58deb630._.js:8554:1)
    at <unknown> (file:/Users/graham/Work/shipwrecked/app/rsvp/actions.ts:3:0)
    at [project]/app/rsvp/actions.ts [app-rsc] (ecmascript) (.next/server/chunks/ssr/[root of the server]__58deb630._.js:8909:1)
    at <unknown> (.next/server/chunks/ssr/[root of the server]__58deb630._.js:9134:148)
    at [project]/.next-internal/server/app/page/actions.js { ACTIONS_MODULE0 => "[project]/app/rsvp/actions.ts [app-rsc] (ecmascript)" } [app-rsc] (server actions loader, ecmascript) <module evaluation> (.next/server/chunks/ssr/[root of the server]__58deb630._.js:9132:1)
    at <unknown> (.next/server/chunks/ssr/[root of the server]__58deb630._.js:9166:365)
    at [project]/.next-internal/server/app/page/actions.js { ACTIONS_MODULE0 => "[project]/app/rsvp/actions.ts [app-rsc] (ecmascript)" } [app-rsc] (server actions loader, ecmascript) (.next/server/chunks/ssr/[root of the server]__58deb630._.js:9162:1)
    at Object.<anonymous> (.next/server/app/page.js:21:9)
   6 | if (!LOOPS_TRANSACTIONAL_SIGNIN_EMAIL_ID) throw new Error("Please set LOOPS_TRANSACTIONAL_SIGNIN_EMAIL_ID");
   7 | if (!LOOPS_TRANSACTIONAL_NOTIFICATION_EMAIL_ID) throw new Error("Please set LOOPS_TRANSACTIONAL_NOTIFICATION_EMAIL_ID");
>  8 | if (!LOOPS_TRANSACTIONAL_PERSONALIZED_EMAIL_ID) throw new Error("Please set LOOPS_TRANSACTIONAL_PERSONALIZED_EMAIL_ID");
     |                                                      ^
   9 |
  10 | async function sendEmailWithLoops(
  11 |     transactionEmailId: string,
 GET / 200 in 2459ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions