Skip to content

Commit 90b6abc

Browse files
committed
fix: throw and error to catch instead of returning null when error occurs
1 parent 3cf2358 commit 90b6abc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/src/hooks/useFindSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export const sessionInfo = async (sessionId: string): Promise<null | Session> =>
77
return response.data ? (response.data as Session) : null;
88
} catch (error) {
99
console.error('Error fetching session:', error);
10-
return null; // ensures a resolved value instead of `void`
10+
throw error;
1111
}
1212
};

0 commit comments

Comments
 (0)