return null instead of throwing an error
This commit is contained in:
parent
aeda74dcf8
commit
05cd1c410a
@ -19,7 +19,10 @@ const loader: LoaderFunction = async ({ request }) => {
|
|||||||
|
|
||||||
const twilioAccount = await db.twilioAccount.findUnique({ where: { accountSid: twilio.accountSid } });
|
const twilioAccount = await db.twilioAccount.findUnique({ where: { accountSid: twilio.accountSid } });
|
||||||
if (!twilioAccount || !twilioAccount.twimlAppSid) {
|
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);
|
const twilioClient = getTwilioClient(twilioAccount);
|
||||||
|
Loading…
Reference in New Issue
Block a user