@@ -328,6 +328,13 @@ AdmissionPublicInstance.interceptors.request.use(publicRequestInterceptor);
328328const userResponseInterceptor = async ( error : AxiosError ) => {
329329 const { config, response } = error ;
330330
331+ // 400번대 에러도 API 로그에 기록
332+ if ( response && response . status >= 400 && response . status < 500 && config ) {
333+ // @ts -ignore
334+ const startTime = config . metadata ?. startTime || performance . now ( ) ;
335+ logApiCall ( config as InternalAxiosRequestConfig , response , startTime ) ;
336+ }
337+
331338 // 모든 에러 타입 리포트 (500, 네트워크 에러, 타임아웃 등)
332339 const shouldReport =
333340 response ?. status === 500 ||
@@ -409,6 +416,13 @@ const userResponseInterceptor = async (error: AxiosError) => {
409416const adminResponseInterceptor = async ( error : AxiosError ) => {
410417 const { config, response } = error ;
411418
419+ // 400번대 에러도 API 로그에 기록
420+ if ( response && response . status >= 400 && response . status < 500 && config ) {
421+ // @ts -ignore
422+ const startTime = config . metadata ?. startTime || performance . now ( ) ;
423+ logApiCall ( config as InternalAxiosRequestConfig , response , startTime ) ;
424+ }
425+
412426 // 모든 에러 타입 리포트 (500, 네트워크 에러, 타임아웃 등)
413427 const shouldReport =
414428 response ?. status === 500 ||
@@ -507,6 +521,13 @@ AdmissionAdminInstance.interceptors.response.use(
507521const publicResponseInterceptor = async ( error : AxiosError ) => {
508522 const { config, response } = error ;
509523
524+ // 400번대 에러도 API 로그에 기록
525+ if ( response && response . status >= 400 && response . status < 500 && config ) {
526+ // @ts -ignore
527+ const startTime = config . metadata ?. startTime || performance . now ( ) ;
528+ logApiCall ( config as InternalAxiosRequestConfig , response , startTime ) ;
529+ }
530+
510531 // 모든 에러 타입 리포트 (500, 네트워크 에러, 타임아웃 등)
511532 const shouldReport =
512533 response ?. status === 500 ||
0 commit comments