Skip to content

Commit

Permalink
try, catch & finally update
Browse files Browse the repository at this point in the history
  • Loading branch information
gfarb committed Sep 29, 2022
1 parent 9a368bf commit 633fe65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/deliverability/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ export default class Access extends SfdxCommand {
await accessLevelField?.select(accessLevelValue);
await contentFrame?.click('#thePage\\:theForm\\:editBlock\\:buttons\\:saveBtn');
await contentFrame?.waitForSelector('#thePage\\:theForm\\:successText');
await browser.close();
this.ux.stopSpinner('🎉 Email Deliverability Access Level has been set!');
} catch (err) {
error = String(err);
} finally {
if (browser !== undefined) await browser.close();
await browser?.close();
if (error !== undefined)
this.ux.stopSpinner(`❌ Access Level could not be set. The following error occurred:\n${String(error)}`);
}
Expand Down

0 comments on commit 633fe65

Please sign in to comment.