Skip to content

Commit fcc59b6

Browse files
authored
Merge pull request #61 from bliotti/patch-1
jwtConsole.js doesn't exit
2 parents a8abd91 + c710cb3 commit fcc59b6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

jwt_console_project/jwtConsole.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,16 @@ function prompt(prompt) {
115115

116116

117117
async function main(){
118-
let accountInfo = await authenticate();
119-
let args = await getArgs(accountInfo.apiAccountId, accountInfo.accessToken, accountInfo.basePath);
120-
let envelopeId = await signingViaEmail.sendEnvelope(args);
121-
console.log(envelopeId);
118+
try {
119+
let accountInfo = await authenticate();
120+
let args = await getArgs(accountInfo.apiAccountId, accountInfo.accessToken, accountInfo.basePath);
121+
let envelopeId = await signingViaEmail.sendEnvelope(args);
122+
console.log(envelopeId);
123+
} catch (error) {
124+
console.error('An error occurred:', error);
125+
} finally {
126+
readline.close();
127+
}
122128
}
123129

124130
main();

0 commit comments

Comments
 (0)