Skip to content

Commit

Permalink
feat: 주석을 no operation 함수로 대체 (SP-684)
Browse files Browse the repository at this point in the history
  • Loading branch information
SungHyun627 committed Aug 27, 2024
1 parent 17d155a commit 1928f87
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/utils/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,17 @@ export const createClient = (config?: AxiosRequestConfig) => {
return response;
},
async (error: AxiosError) => {
// console.log('axios response', error, error.response, error.response?.status);

if (error.response?.status === 400) {
// console.log('400', error.response);
() => {};
}

// 토큰이 만료된 경우
else if (error.response?.status === 401) {
// console.log('401', error.response);
try {
const data = await logOut();
if (data) window.location.href = '/';
} catch (e) {
// console.log(e);
() => {};
}
}
// Login Provider에서 에러 핸들링하도록 reject
Expand Down

0 comments on commit 1928f87

Please sign in to comment.