Error handling

This commit is contained in:
Luke Vella 2024-11-02 18:12:44 +00:00
parent bb46740463
commit bd8029774e
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C

View file

@ -6,6 +6,7 @@ import { Toaster } from "@rallly/ui/toaster";
import type { Viewport } from "next";
import dynamic from "next/dynamic";
import { Inter } from "next/font/google";
import type { Session } from "next-auth";
import React from "react";
import { TimeZoneChangeDetector } from "@/app/[locale]/timezone-change-detector";
@ -36,7 +37,13 @@ export default async function Root({
children: React.ReactNode;
params: { locale: string };
}) {
const session = await getServerSession();
let session: Session | null = null;
try {
session = await getServerSession();
} catch (error) {
console.error(error);
}
return (
<html lang={locale} className={inter.className}>
<body>