I'm deleting various records from my QnA Maker KB via the Invoke-RestMethod PowerShell command and then adding some new QnA's with the same command.
I'm finding that sometimes it works and sometimes I get a 400 Bad Request response with the details:
Invoke-RestMethod : {
"error": {
"code": "BadArgument",
"message": "Invalid input. See details.",
"details": [
{
"code": "ValidationFailure",
"message": "Kb: <KB Number> is already being updated by Operation: 9766ff66-f950-41ed-b0de-b77d8bc78c23. Please wait for it to complete.",
"target": "ConcurrentUpdates"
}
]
}
}
I don't think this is related to the JSON I'm sending as it doesn't fail or work consistently. When I get this response my QnA Maker is then locked from any changes for ~1 hr. I also get the same error if I click Save and Train in the QnA Maker portal.
Any ideas what's happening or how I can debug this?
Invoke-RestMethod
shouldn't function any different that Postman, for example. And, Postman handles QnAMaker API operations without issue. I can make a Postman call to update a KB without it locking up. – Steven Kanberg