The official documentation of this SDK states that all of the errors related to failing HTTP statuses are wrapped in DocusignAPIError, however, this is not the case.
From official documentation:
Common scenarios where the SDK throws a DocusignAPIError are:
- HTTP response status code 400 and above. These represent various error messages that are identified by the HTTP layer. Such errors include not authorized (403) errors, which occur due to issues with authentication.
...
From what I could find in the codebase, it looks that only auth errors are wrapped in DocusignAPIError, while other APIs, like Envelope API, are not. This is the only real usage that I could find:
|
return done(new docusignAPIError(json.error.message, json.error.type, json.error.code, json.error.error_subcode, json.error.fbtrace_id)); |
In reality, if an API call fails with an HTTP error, this error is thrown directly, without any wrappers.
Please either update the documentation or provide DocusignAPIError wrappers in all of the scenarios mentioned in the documentation.
The official documentation of this SDK states that all of the errors related to failing HTTP statuses are wrapped in
DocusignAPIError, however, this is not the case.From official documentation:
From what I could find in the codebase, it looks that only auth errors are wrapped in
DocusignAPIError, while other APIs, like Envelope API, are not. This is the only real usage that I could find:docusign-esign-node-client/src/auth/strategy.js
Line 151 in 136eff1
In reality, if an API call fails with an HTTP error, this error is thrown directly, without any wrappers.
Please either update the documentation or provide
DocusignAPIErrorwrappers in all of the scenarios mentioned in the documentation.