수정했는데 테스트 plz
This commit is contained in:
parent
ad0a5653f4
commit
d466af642c
@ -41,8 +41,9 @@ $api.interceptors.response.use(
|
||||
const loadingStore = useLoadingStore();
|
||||
loadingStore.stopLoading();
|
||||
|
||||
// 테스트 부탁
|
||||
// 로그인 실패, 커스텀 에러 응답 처리 (status는 200 success가 false인 경우)
|
||||
if (response.data && response.data.success === false) {
|
||||
if (response.data && response.data.code > 10000) {
|
||||
const toastStore = useToastStore();
|
||||
const errorCode = response.data.code;
|
||||
const errorMessage = response.data.message || '알 수 없는 오류가 발생했습니다.';
|
||||
@ -56,7 +57,7 @@ $api.interceptors.response.use(
|
||||
toastStore.onToast(errorMessage, 'e');
|
||||
|
||||
// 특정 에러 코드에 대한 추가 처리만 수행
|
||||
if (errorCode === 'USER_NOT_FOUND') {
|
||||
if (errorCode === 10001) {
|
||||
router.push('/login');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user