Client - fix error message when api is not running

This commit is contained in:
Sam 2023-03-04 19:50:44 +01:00
parent fd927beac7
commit 41eb11bbcc
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ authApi.interceptors.response.use(
return response
},
(error) => {
if (error.message !== 'canceled') {
if (error.message !== 'canceled' && error.response) {
removeRequestIfPending(error.response.config)
}
return Promise.reject(error)

View File

@ -24,7 +24,7 @@ api.interceptors.response.use(
return response
},
(error) => {
if (error.message !== 'canceled') {
if (error.message !== 'canceled' && error.response) {
removeRequestIfPending(error.response.config)
}
return Promise.reject(error)