diff --git a/packages/interface/src/utils/fetchTally.ts b/packages/interface/src/utils/fetchTally.ts index 644519cb..7387c46e 100644 --- a/packages/interface/src/utils/fetchTally.ts +++ b/packages/interface/src/utils/fetchTally.ts @@ -48,7 +48,9 @@ export async function fetchTally(id: string): Promise { body: JSON.stringify({ query: tallyQuery.replace("id: $id", `id: "${id}"`), }), - }).then((response: GraphQLResponse) => response.data?.tally); + }) + .then((response: GraphQLResponse) => response.data?.tally) + .catch(() => undefined); } /** @@ -62,5 +64,7 @@ export async function fetchTallies(): Promise { body: JSON.stringify({ query: talliesQuery, }), - }).then((r) => r.data.tallies); + }) + .then((r) => r.data.tallies) + .catch(() => []); }