We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 689298d commit af43460Copy full SHA for af43460
src/services/content-api/parsers/custom/covid-19.tsx
@@ -58,8 +58,12 @@ export const buildFilteredContentForCovid19Vaccine = async (apiContent: string):
58
};
59
60
async function _getNow() {
61
- const headersList = await headers();
62
- return UtcDateTimeFromStringSchema.safeParse(headersList.get("x-e2e-datetime")).data ?? new Date();
+ try {
+ const headersList = await headers();
63
+ return UtcDateTimeFromStringSchema.safeParse(headersList.get("x-e2e-datetime")).data ?? new Date();
64
+ } catch {
65
+ return new Date();
66
+ }
67
}
68
69
async function _buildActions(): Promise<Action[]> {
0 commit comments