signnow / SignNowNodeSDK

The Official SignNow Node.js Client Library for interacting with SignNow REST API. Sign documents, request e-signatures, and build role-based workflows with multiple signers using this client.
https://www.signnow.com/developers
MIT License
20 stars 22 forks source link

Unhandled error on document.remove function #91

Closed lcalvy closed 1 year ago

lcalvy commented 3 years ago

Hi,

I'm experiencing a serious issue using

document.remove(MYID, { cancelInvites: true})

This cause a non catchable error because there is a error on line https://github.com/signnow/SignNowNodeSDK/blob/master/lib/document/index.js#L962 with error saying Document not found because document was previously deleted on this line https://github.com/signnow/SignNowNodeSDK/blob/master/lib/document/index.js#L1019

The big issue is that this error is not catch by a .catch method and throw without any option to be catched by code calling document.remove