DocuSign webhook通知已中止

问题描述 投票:0回答:2

我们有2个envs(升级和测试版)并使用demo docusign帐户(两者都相同)。我不知道什么时候docusign webhook请求在前一段时间停止工作。我们没有做太多改变。现在我们在Docusign管理员的Failed Connect Notifications部分获得The request was aborted: The connection was closed unexpectedly.。我google了错误消息,但没有得到任何有用的信息。

你能告诉我这个错误意味着什么,或者我可以做些什么来调试/修复它?

更新:来自Docusign管理员'连接失败通知' - link on the picture

我还从Docusign日志下载了13_OK_GetConnectFailures.txt文件,例如:

{"type":"failure",
 "failures":[{
    "accountId":"8c188fc6-e77a-4777-843b-bb4595835d48",
    "envelopeId":"78c31c0e-28e0-4a9d-bcc6-ac20d583eb18",
    "subject":"Please sign this document",
    "created":"2019-03-04T21:37:42.0300000Z",
    "userName":"Hanover Specialty Lines",
    "email":"our_email",
    "status":"completed",
    "lastTry":"2019-03-04T21:37:42.0300000Z",
    "retryCount":"0",
    "error":"https://our_domain_com/api/docusign/webhook :: Error - The request was aborted: The connection was closed unexpectedly.",
    "connectId":"Envelope",
    "failureUri":"/accounts/8c188fc6-e77a-4777-843b-bb4595835d48/connect/failures/16025814",
    "failureId":"16025814",
    "retryUri":"/accounts/8c188fc6-e77a-4777-843b-bb4595835d48/connect/envelopes/78c31c0e-28e0-4a9d-bcc6-ac20d583eb18/retry_queue"
 },

所以我没有看到任何有用的描述......

更新:我尝试了webhook.site,下一条消息出现在DocuSign link to the picture但是我也在我的本地机器上设置了生成的webhook,DocuSign向这个webhook发送了请求。在staging env和我的本地机器上的代码是相同的。

更新:我试图替换所有.includeDocuments设置并将它们设置为false然后我得到403代码错误see picture

  /**
   * Composing a notification is complex and requires to prepare several layers under
   * the main EventNotification object.
   *
   * @method getEventNotification
   */
  getEventNotification() {
    // Setup EventNotification settings
    const eventNotification = new docusign.EventNotification();
    eventNotification.url = this.configuration.webhookUrl;
    eventNotification.loggingEnabled = 'true';
    eventNotification.requireAcknowledgment = 'true';
    eventNotification.useSoapInterface = 'false';
    eventNotification.includeCertificateWithSoap = 'false';
    eventNotification.signMessageWithX509Cert = 'false';
    eventNotification.includeDocuments = 'true';
    eventNotification.includeDocumentFields = 'true';
    eventNotification.includeEnvelopeVoidReason = 'true';
    eventNotification.includeTimeZone = 'true';
    eventNotification.includeSenderAccountAsCustomField = 'true';
    eventNotification.includeDocumentFields = 'true';
    eventNotification.includeCertificateOfCompletion = 'true';

    // Add states to get notified on (Envelope and Recipient-level)
    const envelopeEvents = [];
    [
      'sent',
      'delivered',
      'completed',
      'declined',
      'voided',
    ].forEach(eventKey => {
      const event = new docusign.EnvelopeEvent();
      event.envelopeEventStatusCode = eventKey;
      event.includeDocuments = true;
      envelopeEvents.push(event);
    });

    const recipientEvents = [];
    ['Sent', 'Delivered', 'Completed', 'Declined'].forEach(eventKey => {
      const event = new docusign.RecipientEvent();
      event.recipientEventStatusCode = eventKey;
      event.includeDocuments = true;
      recipientEvents.push(event);
    });

    eventNotification.envelopeEvents = envelopeEvents;
    eventNotification.recipientEvents = recipientEvents;

    return eventNotification;
  }
docusignapi
2个回答
0
投票

通常,Connect错误消息The request was aborted: The connection was closed unexpectedly表示Connect系统在尝试向您的服务器(您的“侦听器”)发出HTTPS POST请求时未收到响应。

要进行调试,请仔细检查服务器的日志,以查看在连接错误消息中指定的时间是否有传入请求。然后了解该请求发生了什么。

由于请求最终将由Connect重试,或者将被同一信封的另一个通知消息取代,如果它很少发生,这并不是什么大问题。

更新的答案

如果您没有看到任何传入的POST请求到您的侦听器服务器,那么您的服务器可能无法在Internet上使用。

请记住,您的侦听服务器需要在公共互联网上可用,因此DocuSign可以向其发出POST请求。

通过发出POST请求来测试您的侦听器的网络连接。您可以使用curl(但您的测试计算机不应位于同一网络或VPN上)作为您的监听器。

或者您可以使用https://www.apirequest.io/https://apitester.com/等公共测试工具


0
投票

Docusign因防火墙而被阻止,因为它没有设置我们检查的一些标题。因此,您需要检查防火墙设置。并查看此问题中的其他回复。他们真的帮助我!

© www.soinside.com 2019 - 2024. All rights reserved.