mirror of https://github.com/fantasticit/think.git
client: catch error
This commit is contained in:
parent
86755013b4
commit
cd071ccae1
|
@ -14,6 +14,7 @@ export async function serverPrefetcher(ctx: NextPageContext, actions: PrefetchAc
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
@ -25,4 +26,7 @@ export async function serverPrefetcher(ctx: NextPageContext, actions: PrefetchAc
|
||||||
return {
|
return {
|
||||||
dehydratedState: dehydrate(queryClient),
|
dehydratedState: dehydrate(queryClient),
|
||||||
};
|
};
|
||||||
|
} catch (err) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue