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(
21
21
return response ;
22
22
} ,
23
23
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
+ ) {
25
28
store . dispatch ( "auth/logout" ) ;
26
29
}
27
30
return Promise . reject ( error ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ authClient.interceptors.response.use(
14
14
return response ;
15
15
} ,
16
16
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
+ ) {
18
21
store . dispatch ( "auth/logout" ) ;
19
22
}
20
23
return Promise . reject ( error ) ;
You can’t perform that action at this time.
0 commit comments