File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1420,7 +1420,9 @@ IMPORTANT:
1420
1420
}
1421
1421
1422
1422
if ( authRequired && ! authCode ) {
1423
- console . warn ( "Authorization code is required" ) ;
1423
+ setIsLoading ( false ) ;
1424
+ console . error ( "Authorization code is required" ) ;
1425
+ setError ( 'Authorization code is required' ) ;
1424
1426
return ;
1425
1427
}
1426
1428
@@ -1442,7 +1444,10 @@ IMPORTANT:
1442
1444
// setError(\`Cache clear failed: ${errorText}. Trying to refresh...\`);
1443
1445
if ( response . status == 401 ) {
1444
1446
setIsLoading ( false ) ;
1445
- throw new Error ( 'Failed to validate the authorization code' ) ;
1447
+ setLoadingMessage ( undefined ) ;
1448
+ setError ( 'Failed to validate the authorization code' ) ;
1449
+ console . error ( 'Failed to validate the authorization code' )
1450
+ return ;
1446
1451
}
1447
1452
}
1448
1453
} catch ( err ) {
Original file line number Diff line number Diff line change @@ -239,7 +239,10 @@ export default function Home() {
239
239
// Check authorization code
240
240
const validation = await validateAuthCode ( ) ;
241
241
if ( ! validation ) {
242
- throw new Error ( 'Failed to validate the authorization code' ) ;
242
+ setError ( `Failed to validate the authorization code` ) ;
243
+ console . error ( `Failed to validate the authorization code` ) ;
244
+ setIsConfigModalOpen ( false ) ;
245
+ return ;
243
246
}
244
247
245
248
// Prevent multiple submissions
You can’t perform that action at this time.
0 commit comments