From 4472ba21cfadbe23a7a14d248c0b6fe60f916f08 Mon Sep 17 00:00:00 2001 From: ColinRgm Date: Wed, 11 Dec 2024 10:32:45 +0100 Subject: [PATCH] fix: resolve the error about throw new error Closes: #205 --- nextjs-interface/src/lib/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextjs-interface/src/lib/data.ts b/nextjs-interface/src/lib/data.ts index 55a7a7c..0362a92 100644 --- a/nextjs-interface/src/lib/data.ts +++ b/nextjs-interface/src/lib/data.ts @@ -39,7 +39,7 @@ export const fetchWithAuth = async (url: string) => { if (response.status === 401) { window.location.href = "/login"; } - throw new Error(`HTTP error! Status: ${response.status}`); + new Error(`HTTP error! Status: ${response.status}`); } return await response.json(); } catch (error) {