timeout 오류 메세지 추가

This commit is contained in:
focp212@naver.com
2025-11-12 08:51:33 +09:00
parent 897dc7b16d
commit 216a80ac88
2 changed files with 6 additions and 4 deletions

View File

@@ -95,9 +95,7 @@ export const HomePage = () => {
}
}).catch((e) => {
console.log('catch', e);
}).finally(() => {
console.log('finally');
setAuthRegisterOn(true);
}).catch((e: any) => {
if(e.response?.data?.error?.message){

View File

@@ -4,7 +4,8 @@ import { StorageKeys } from '@/shared/constants/local-storage';
import {
checkIsAxiosError,
getLocalStorage,
setLocalStorage
setLocalStorage,
snackBar
} from '@/shared/lib';
import { appBridge } from '@/utils/appBridge';
import { LoginResponse } from '@/entities/user/model/types';
@@ -58,6 +59,9 @@ const onResponseFulfilled = (response: AxiosResponse) => {
const onResponseRejected = (error: AxiosError) => {
console.log('onResponseRejected --> ', error);
if(!!error.code && error.code === 'ETIMEDOUT'){
snackBar(error?.message);
}
if(error?.status === 401){
if(appBridge.isNativeEnvironment()){
return appBridge.safeCall(() => appBridge.requestRefreshToken()).then((token: LoginResponse) => {