Azure Function引发异常“异常:错误:请求已中止”

时间:2020-02-28 20:46:59

标签: node.js axios azure-functions

我有一个从第三方服务调用的Azure函数。主体具有URL和元数据,该函数使用URL下载文件并将其上传到Azure存储容器。

30%的时间,在上传文件时,功能会在同一时间点失败,但以下情况除外:

Result: Failure
Exception: Error: The request was aborted
Stack: Error: The request was aborted
    at new RestError (D:\home\site\wwwroot\node_modules\@azure\ms-rest-js\dist\msRest.node.js:1397:28)
    at AxiosHttpClient.<anonymous> (D:\home\site\wwwroot\node_modules\@azure\ms-rest-js\dist\msRest.node.js:1491:35)
    at step (D:\home\site\wwwroot\node_modules\tslib\tslib.js:136:27)
    at Object.next (D:\home\site\wwwroot\node_modules\tslib\tslib.js:117:57)
    at fulfilled (D:\home\site\wwwroot\node_modules\tslib\tslib.js:107:62)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

以下是日志中的示例:

2020-02-28 19:38:10.485  Executing 'Functions.DownloadMyFile' (Reason='This function was programmatically called via the host APIs.', Id=xyz)
2020-02-28 19:38:10.534  Fetching url...
2020-02-28 19:38:10.535  Downloading file:https://myvendor.com/file
2020-02-28 19:38:10.651  File was successfully downloaded!
2020-02-28 19:38:10.651  Uploading new file: c93b6221-23f9-484f-a8c8-740606c35a53
2020-02-28 19:38:10.839  Result: Failure Exception: Error: The...

因此,它似乎开始上传然后失败了!仅供参考,如果我以后尝试从Postman尝试失败的呼叫,它们将始终起作用-但我必须等待几分钟。

-更新:

添加更多日志以获取有关该异常的更多详细信息之后,以上问题就是这个https://github.com/Azure/azure-sdk-for-js/issues/2933

0 个答案:

没有答案