Skip to content

Commit

Permalink
fix: remove noisy error log
Browse files Browse the repository at this point in the history
  • Loading branch information
peterphanouvong committed Nov 6, 2024
1 parent 5f3e010 commit 5fe4622
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/session/sessionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ const COOKIE_LIST = [
* @returns {Promise<import('@kinde-oss/kinde-typescript-sdk').SessionManager>}
*/
export const sessionManager = async (req, res) => {
try{
try {
const cookieStore = await cookies();
if (!req) return appRouterSessionManager(cookieStore);
return isAppRouter(req)
? appRouterSessionManager(cookieStore)
: pageRouterSessionManager(req, res);
return isAppRouter(req)
? appRouterSessionManager(cookieStore)
: pageRouterSessionManager(req, res);
} catch (error) {
console.error('Failed to initialize session manager:', error);
throw error;
}
};
Expand Down

0 comments on commit 5fe4622

Please sign in to comment.