gpt4 book ai didi

node.js - 无法执行存储过程 : 'One of the specified inputs is invalid.'

转载 作者:搜寻专家 更新时间:2023-11-01 00:41:19 24 4
gpt4 key购买 nike

我正在使用 Node.js、Express.js 和 Azure DocumentDB 开发 API。我能够使用以下内容成功注册存储过程:

var documentdb = require('documentdb').DocumentClient;
var client = new documentdb(/* endpoint URL */, { "masterKey": /* master key */ });
var dbLink = /* db self link */

var test = {
id: 'test',
body: function () {
__.response.setBody('Hello world.');
}
};

client.upsertStoredProcedure(dbLink, test, function (err, res) {
// save self link and rid to stored procedure object
test.link = res._self;
test.link = res._rid;
});

但是,当我尝试使用这段代码执行存储过程时:

client.executeStoredProcedure(test.link, function (err, res) {
console.log(err || res);
});

我收到 400 Bad Request 错误:执行函数时遇到异常。指定的输入之一无效。

我做错了什么?

最佳答案

@dwheib 在 separate thread 上解决了这个问题- 为了大家的利益,在这里重新发布。

问题是数据库自链接 (test.link) 中缺少结尾的反斜杠。

关于node.js - 无法执行存储过程 : 'One of the specified inputs is invalid.' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33489482/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com