Skip to content

HTTP errors are not wrapped in DocusignAPIError #382

Description

@Zip753

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions