У нас есть 2 envs (staging и beta) и мы используем демо docusign аккаунт (одинаковый для них обоих).Я не когда, но docusign webhook запрос перестал работать некоторое время назад только в постановке.Мы не сделали много изменений.И теперь мы получаем The request was aborted: The connection was closed unexpectedly.
в разделе Уведомления о неудачном подключении администратора Docusign.Я погуглил сообщение об ошибке, но не получил ничего полезного.
Не могли бы вы порекомендовать, что означает эта ошибка или что я могу сделать, чтобы отладить / исправить ее?
Обновлено: Из админа Docusign «Подключить уведомления о сбоях» - ссылка на картинку
Я также скачал 13_OK_GetConnectFailures.txt
файл из журналов Docusign, например:
{"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 ссылка на изображение Но я также установил сгенерированный webhook на свою локальную машину, и DocuSign отправил запрос на этот webhook.Код одинаков при установке env и моей локальной машины.
Обновлено: Я попытался заменить все настройки .includeDocuments
и установить их на false
, а затем я получил ошибку кода 403 см. Рисунок
/**
* 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;
}