We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2506647 commit 3a59795Copy full SHA for 3a59795
1 file changed
apps/dashboard/src/config/axios.config.ts
@@ -16,3 +16,15 @@ authenticatedAxios.interceptors.request.use((config) => {
16
17
return config;
18
});
19
+
20
+authenticatedAxios.interceptors.response.use(
21
+ (response) => response,
22
+ (error) => {
23
+ if (error.response?.status === 401) {
24
+ Cookies.remove('jwt');
25
+ window.location.reload();
26
+ }
27
28
+ return Promise.reject(error);
29
30
+);
0 commit comments