File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change 1
- import { notFound } from 'next/navigation' ;
2
1
import axios , { CreateAxiosDefaults , InternalAxiosRequestConfig } from 'axios' ;
3
2
4
3
import { AuthRefreshIgnoredError } from '@/types/customError' ;
7
6
isAuthFailedError ,
8
7
isAuthRefreshError ,
9
8
isAxiosErrorWithCustomCode ,
10
- isNotFoundError ,
11
9
} from '@/utils/helpers' ;
12
10
import { deleteAuthSession , setAuthSession } from '@/server/session' ;
13
11
import { deleteCookie } from '@/utils/cookie' ;
@@ -43,10 +41,6 @@ const responseHandler = async (error: unknown) => {
43
41
44
42
console . warn ( code , message ) ;
45
43
46
- if ( isNotFoundError ( code ) ) {
47
- notFound ( ) ;
48
- }
49
-
50
44
if ( originRequest && isAuthRefreshError ( code ) ) {
51
45
return silentRefresh ( originRequest ) ;
52
46
}
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ const isAuthFailedError = (code: ServiceErrorCode) =>
15
15
16
16
const isAuthRefreshError = ( code : ServiceErrorCode ) => code === 'A4' ;
17
17
18
- const isNotFoundError = ( code : ServiceErrorCode ) => code === 'C1' ;
19
-
20
18
/** axios 에러 응답에 custom error code가 포함되어 있는지 확인하며, 이를 보장하는 타입 가드 함수입니다. */
21
19
const isAxiosErrorWithCustomCode = (
22
20
error : unknown
@@ -30,9 +28,4 @@ const isAxiosErrorWithCustomCode = (
30
28
) ;
31
29
} ;
32
30
33
- export {
34
- isAuthFailedError ,
35
- isAuthRefreshError ,
36
- isNotFoundError ,
37
- isAxiosErrorWithCustomCode ,
38
- } ;
31
+ export { isAuthFailedError , isAuthRefreshError , isAxiosErrorWithCustomCode } ;
You can’t perform that action at this time.
0 commit comments