File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,16 @@ function prompt(prompt) {
115
115
116
116
117
117
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
+ }
122
128
}
123
129
124
130
main ( ) ;
You can’t perform that action at this time.
0 commit comments