0
突然之間,我們的代碼停止工作,經過一些檢查後,我們找到了哪裏。Survey Monkey - 更新收集器的錯誤
我們的代碼是這樣的:
internal async Task CreateNewCollector(string name)
{
_new_collector = await (
await _client.PostAsyncAs<CollectorDetails>(
_survey.Collectors(),
_client.MakeJsonContent(new { from_collector_id = _last_collector.id })
).ContinueWith(n =>
_client.PatchAsyncAs<CollectorDetails>(
new Uri(n.Result.href),
_client.MakeJsonContent(new { name = name, status = "open" })
)
)
);
}
它創建了一個收集器和右它試圖修補它改變其名稱和狀態之後。那是它失敗的時候。由於在圖像上所提到的,這是結果:
{"error": {"docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "Invalid schema in the body provided.", "id": "1002", "name": "Bad Request", "http_status_code": 400}}