Skip to content

Commit 78352f7

Browse files
committed
error handling
1 parent d137740 commit 78352f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

frontend/src/App.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ function App() {
7373

7474
useEffect(() => {
7575
// Make a GET request to the server to ensure the CSRF cookie is set
76-
api.get('set-csrf-token/');
76+
api.get('set-csrf-token/')
77+
.catch(error => {
78+
// Error is already handled by the interceptor, so we can
79+
// just log it or ignore it here
80+
console.error('CSRF token fetch failed:', error.message);
81+
});
7782
}, []);
7883

7984
// Apply the dark mode class at the top level based on isDarkMode state
File renamed without changes.

0 commit comments

Comments
 (0)