diff --git a/src/pages/monzo/dashboard/index.tsx b/src/pages/monzo/dashboard/index.tsx index 9d395de..b6affaa 100644 --- a/src/pages/monzo/dashboard/index.tsx +++ b/src/pages/monzo/dashboard/index.tsx @@ -9,13 +9,13 @@ type Props = data: { accounts: Array< Models.Account & { - balance?: Models.Balance; - pots?: Models.Pot[]; + balance?: Models.Balance | null; + pots?: Models.Pot[] | null; webhooks?: Array<{ id: Id<'webhook'>; account_id: Models.Account['id']; url: string; - }>; + }> | null; } >; }; @@ -198,9 +198,9 @@ export const getServerSideProps: GetServerSideProps = async ({req}) => { } const [balance, webhooks, pots] = await Promise.all([ - monzo.getBalance(account.id), - monzo.listWebhooks(account.id), - monzo.getPots(account.id), + monzo.getBalance(account.id).catch(() => null), + monzo.listWebhooks(account.id).catch(() => null), + monzo.getPots(account.id).catch(() => null), ]); return {