File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,6 @@ class SettingsPage extends React.Component<SettingsPageProps> {
368
368
369
369
this . props . accountStore . cancelSubscription ( ) . catch ( ( e ) => {
370
370
alert ( e . message ) ;
371
- reportError ( e ) ;
372
371
} ) ;
373
372
} ;
374
373
}
Original file line number Diff line number Diff line change @@ -317,16 +317,21 @@ export class AccountStore {
317
317
}
318
318
319
319
cancelSubscription = flow ( function * ( this : AccountStore ) {
320
- yield cancelSubscription ( ) ;
321
-
322
- console . log ( 'Subscription cancel requested' ) ;
323
- this . isAccountUpdateInProcess = true ;
324
- yield this . waitForUserUpdate ( ( ) =>
325
- ! this . user . subscription ||
326
- this . user . subscription . status === 'deleted'
327
- ) ;
328
- this . isAccountUpdateInProcess = false ;
329
- console . log ( 'Subscription cancellation confirmed' ) ;
320
+ try {
321
+ this . isAccountUpdateInProcess = true ;
322
+ yield cancelSubscription ( ) ;
323
+ yield this . waitForUserUpdate ( ( ) =>
324
+ ! this . user . subscription ||
325
+ this . user . subscription . status === 'deleted'
326
+ ) ;
327
+ console . log ( 'Subscription cancellation confirmed' ) ;
328
+ } catch ( e : any ) {
329
+ console . log ( e ) ;
330
+ reportError ( `Subscription cancellation failed: ${ e . message || e } ` ) ;
331
+ throw e ;
332
+ } finally {
333
+ this . isAccountUpdateInProcess = false ;
334
+ }
330
335
} ) ;
331
336
332
337
}
You can’t perform that action at this time.
0 commit comments