MSP-3105 fix eslint and add constants in styleConst
This commit is contained in:
1 parent
67691c58f2
commit
a380067908
5 files changed
+39
-30
No files matched your search
@@ -33,16 +33,18 @@ apiService.interceptors.request.use(
|
||||
apiService.interceptors.response.use(
|
||||
async (response: any) => response,
|
||||
(error: AxiosError<MSPError>) => {
|
||||
console.error(error)
|
||||
console.error(error)
|
||||
if (error.response && error.response.status === 401) {
|
||||
LocalStorage.clear()
|
||||
message.error('Ваша сессия истекла"').then()
|
||||
LocalStorage.set('redirectUrl', location.pathname)
|
||||
window.location.href = routePaths.login
|
||||
LocalStorage.clear()
|
||||
message.error('Ваша сессия истекла"').then()
|
||||
LocalStorage.set('redirectUrl', location.pathname)
|
||||
window.location.href = routePaths.login
|
||||
}
|
||||
|
||||
if (error.response && error.response.status >= 500) {
|
||||
message.error('Внутренняя ошибка сервиса, попробуйте повторить запрос').then()
|
||||
message
|
||||
.error('Внутренняя ошибка сервиса, попробуйте повторить запрос')
|
||||
.then()
|
||||
}
|
||||
|
||||
return Promise.reject(error)
|
||||
|
||||
Reference in new issue
Block a user