Skip to content

Commit

Permalink
Get some more info about thrown error
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Brown committed Dec 3, 2024
1 parent d0722db commit 6f9ab1f
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,20 @@ export default async function loadDefaultExplorePageData(f: typeof fetch) {

const fetchFeaturedLists = async () => {
const results = await Promise.all(
FEATURED_DRIP_LISTS.map((id) =>
query<FeaturedDripListQuery, FeaturedDripListQueryVariables>(
featuredDripListQuery,
{ id, chain: network.gqlName },
f,
),
),
FEATURED_DRIP_LISTS.map(async (id) => {
try {
const result = await query<FeaturedDripListQuery, FeaturedDripListQueryVariables>(
featuredDripListQuery,
{ id, chain: network.gqlName },
f,
);
return result;
} catch (error) {
// eslint-disable-next-line no-console
console.error('fetchFeaturedLists', error);
throw error;
}
}),
);

return results.map((res) => res.dripList);
Expand All @@ -107,6 +114,7 @@ export default async function loadDefaultExplorePageData(f: typeof fetch) {
return response.json();
};

// TODO: fetch is failing here for some reason!!!
const [blogPosts, projects, featuredDripLists, totalDrippedPrices, tlv] = await cached(
redis,
cacheKey,
Expand Down

0 comments on commit 6f9ab1f

Please sign in to comment.