diff --git a/app/features/phone-calls/loaders/twilio-token.ts b/app/features/phone-calls/loaders/twilio-token.ts index 3c2c403..5b74c14 100644 --- a/app/features/phone-calls/loaders/twilio-token.ts +++ b/app/features/phone-calls/loaders/twilio-token.ts @@ -19,7 +19,10 @@ const loader: LoaderFunction = async ({ request }) => { const twilioAccount = await db.twilioAccount.findUnique({ where: { accountSid: twilio.accountSid } }); if (!twilioAccount || !twilioAccount.twimlAppSid) { - throw new Error("unreachable"); + logger.warn( + "Twilio account is connected but the background jobs didn't run properly, this shouldn't be happening", + ); + return null; } const twilioClient = getTwilioClient(twilioAccount);