首页 > 解决方案 > Docusign Webhooks:错误 - 远程服务器返回错误:(413)请求实体太大

问题描述

我正在使用 Webhook 在完成后接收和下载信封的文档,但我从 Webhook 日志中收到以下错误:

Error: Exception in EnvelopeIntegration.RunIntegration: e6c44c18-aedf-424d-b6d5-19ad9db635e3 :: {{WEBHOOK_POST_URL}} :: Error - The remote server returned an error: (413) Request Entity Too Large.

我传递给信封的 EventNotification 如下:

const eventNotification = docusign.EventNotification.constructFromObject({
url: {{WEBHOOK_POST_URL}},
loggingEnabled: true,
requireAcknowledgment: true,
envelopeEvents: [
  {
    envelopeEventStatusCode: 'completed',
    includeDocuments: true,
  },
],

});

我怀疑这是因为接收到的文档太大,并且 webhook 发出的 POST 请求被服务器拒绝,但我不太确定解决这个问题的最佳方法是什么。任何帮助是极大的赞赏!

标签: node.jsdocusignapi

解决方案


原来,错误来自 Nginx。我可以按照这里的答案来解决它: 错误:请求实体太大

值得注意的是,我在 Nginx 配置文件中添加了这一行:

client_max_body_size 100M; #100mb

推荐阅读