我一直在研究基于 smartsheet 的简单生产管理流程。我一直在运行的代码在我的 Ubuntu 机器上运行良好,然后我将它复制到运行相同节点版本的 Parrot Linux 机器上,它找不到存在的行。以下是请求:
var copyRow = {
"rowIds": artToProdRowsToCopy,
"to": {
"sheetId": productionId
}
};
// Set options
var options = {
sheetId: artId,
body: copyRow,
queryParameters: {
include: "all"
}
};
console.log(options);
// Copy the normal engraved rows from art to production
smartsheet.sheets.copyRowToAnotherSheet(options)
.then(function(results) {
callback1(null, results);
})
.catch(function(error) {
console.log(error);
});
选项的日志输出:
{ sheetId: 8129017524546436,
body:
{ rowIds: [ 8886954296800644 ],
to: { sheetId: 6941481487333252 } },
queryParameters: { include: 'all' } }
错误:
{ statusCode: 404,
errorCode: 1006,
message: 'Not Found',
refId: 'zjl2z56296l9' }
我在 Parrot Linux 3.9 上运行节点 v8.9.1。
我已经检查了这些工作表和行 ID # 中的每一个是否正确并且它们都是正确的(但是示例中的那些不是真实的)。任何帮助,将不胜感激。
编辑:添加调试信息:
[Smartsheet] 2017-11-20T20:22:55.876Z[ INFO] POST https://api.smartsheet.com/2.0/sheets/8129017124546436/rows//copy?include=all
[Smartsheet] 2017-11-20T20:22:55.876Z[VERBOSE] Request Payload (preview): {"rowIds":[2759271070885764,3212501789763460,4576920289470340,8982631438149508,2962733838690180,8886959296800644],"to":{"sheetId":6941441487333252}}
[Smartsheet] 2017-11-20T20:22:55.876Z[ DEBUG] Request Payload (full): {"rowIds":[2759271070885764,3212501789763460,4576920289470340,8982631438149508,2962733838690180,8886959296800644],"to":{"sheetId":6941441487333252}}
[Smartsheet] 2017-11-20T20:22:56.155Z[ ERROR] Request failed after 0 retries
[Smartsheet] 2017-11-20T20:22:56.156Z[ ERROR] POST https://api.smartsheet.com/2.0/sheets/8129017124546436/rows//copy?include=all
[Smartsheet] 2017-11-20T20:22:56.156Z[ ERROR] Response: Failure (HTTP 404)
Error Code: 1006 - Not Found
Ref ID: 85bn0m2j8oki