File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ apiClient.interceptors.response.use(
2121 return response ;
2222 } ,
2323 function ( error ) {
24- if ( error . response . status === 401 || error . response . status === 419 ) {
24+ if (
25+ error . response &&
26+ ( error . response . status === 401 || error . response . status === 419 )
27+ ) {
2528 store . dispatch ( "auth/logout" ) ;
2629 }
2730 return Promise . reject ( error ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ authClient.interceptors.response.use(
1414 return response ;
1515 } ,
1616 function ( error ) {
17- if ( error . response . status === 401 || error . response . status === 419 ) {
17+ if (
18+ error . response &&
19+ ( error . response . status === 401 || error . response . status === 419 )
20+ ) {
1821 store . dispatch ( "auth/logout" ) ;
1922 }
2023 return Promise . reject ( error ) ;
You can’t perform that action at this time.
0 commit comments