File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed
src/app/admin/member-manager Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -85,26 +85,19 @@ export default function AdminUsersPage() {
8585 headers : { Accept : 'application/json' } ,
8686 } ) ;
8787
88+ if ( ! alive ) return ;
89+
90+ // 403이면 바로 discard
91+ if ( res ?. status === 403 ) {
92+ setCanRenderDelete ( false ) ;
93+ return ;
94+ }
95+
8896 const okHttp = res ?. status === 200 || res ?. status === 204 ;
8997 const okBody = ( res ?. data ?. code ?? 200 ) === 200 ;
9098
9199 setCanRenderDelete ( okHttp && okBody ) ;
92- } catch ( error ) {
93- // ---- 디버그용 상세 로그 ----
94- const status = error ?. response ?. status ;
95- const statusText = error ?. response ?. statusText ;
96- const apiMessage = error ?. response ?. data ?. message ?? error ?. response ?. data ?. error ?? error ?. message ;
97- const method = error ?. config ?. method ?. toUpperCase ?. ( ) ;
98- const url = error ?. config ?. url ;
99-
100- console . error ( '[auth LEAD check failed]' , JSON . stringify ( {
101- status,
102- statusText,
103- method,
104- url,
105- message : apiMessage
106- } , null , 2 ) ) ;
107-
100+ } catch {
108101 if ( alive ) setCanRenderDelete ( false ) ;
109102 }
110103 } ) ( ) ;
You can’t perform that action at this time.
0 commit comments