Skip to content

Commit

Permalink
fix: resolve the error about throw new error
Browse files Browse the repository at this point in the history
Closes: #205
  • Loading branch information
ColinRgm committed Dec 11, 2024
1 parent 875db14 commit 4472ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nextjs-interface/src/lib/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4472ba2

Please sign in to comment.