Error: 'NoneType' object does not support item assignment , when making an HTTP call in Zapier

Error: 'NoneType' object does not support item assignment , when making an HTTP call in Zapier

我写了一些代码来根据表单提交将数据输入数据库,代码在我的网站上工作得很好,但我需要它与 zapier 集成。当我 运行 代码出现错误“'NoneType' 对象不支持项目分配”,如果我忽略该错误并打开 zap it 运行s 并正确输入数据,但仍然出现错误,然后将自行关闭。我是 zapier 中编码的新手,已经准备好这里的帮助页面 https://zapier.com/help/code/ 但一直无法找出问题所在。

fetch("www.url.com",
{
headers: {
  'Content-Type': 'application/json'
},
method: "POST",
body: JSON.stringify(
        {
          "values": {
            "1": inputData.name,
            "2": inputData.title,
            "3": inputData.location,
            "5": inputData.phone,
            "6": inputData.email,
            "7": inputData.facebook,
            "8": inputData.twitter,
            "9": inputData.linkedin,
            "10": inputData.about,
            "11": {
                    "url": inputData.image,
                    "type": "image"
                  }
          }
        }
    )
})
.catch(callback);

所以我发现错误与.catch(callback);有关并在上面添加了这段代码并修复了它

.then(function(res) {
return res.json();
})
.then(function(json) {
callback(null, json);
})