File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,22 @@ const _SlashAuthModal = (): ReactElement => {
124124 setIsLoading ( true ) ;
125125
126126 const client = new Client ( slashtag ) ;
127- const response = await client . authz ( _url ) . catch ( ( e : Error ) => {
128- if ( e . message === 'channel closed' ) {
129- closeBottomSheet ( 'slashauthModal' ) ;
130- showErrorNotification ( {
131- title : t ( 'signin_to_error_header' ) ,
132- message : t ( 'signin_to_error_text' ) ,
133- } ) ;
134- }
135- } ) ;
127+ let response ;
128+
129+ try {
130+ response = await client . authz ( _url ) ;
131+ } catch ( e ) {
132+ showErrorNotification ( {
133+ title : t ( 'signin_to_error_header' ) ,
134+ message :
135+ e . message === 'channel closed'
136+ ? t ( 'signin_to_error_text' )
137+ : e . message ,
138+ } ) ;
139+ setIsLoading ( false ) ;
140+ closeBottomSheet ( 'slashauthModal' ) ;
141+ return ;
142+ }
136143
137144 if ( response ?. status === 'ok' ) {
138145 showSuccessNotification ( {
You can’t perform that action at this time.
0 commit comments