joshbalfour / node-cognitive-services

Microsoft® Cognitive Services SDK for Node.JS
https://www.microsoft.com/cognitive-services
MIT License
105 stars 45 forks source link

createAPersonGroup returns error: Cannot read property 'hasOwnProperty' of null #74

Closed Amirbahal closed 4 years ago

Amirbahal commented 4 years ago

Expected Behavior

Returning an ok 200 and creating a person group to which I can add persons.

Actual Behavior

Returning the error: Cannot read property 'hasOwnProperty' of null

Relevant Code

face.createAPersonGroup({ parameters: { "personGroupId": "asdfasdfadsfadfdasf", "name" : "Test Person Group", "userData": "this-is-test-data" }, Body: { } }).then(res => { console.log(res); }).catch(err => { console.log("Create A PERSON Group: " + err); });

Specifications

miparnisari commented 4 years ago

Sorry for the late response. Can you please try this?

face.createAPersonGroup({
  parameters: {
  "personGroupId": "asdfasdfadsfadfdasf",
  },
  body: {
    "name" : "Test Person Group",
    "userData": "this-is-test-data"
  }
}).then(res => {
  console.log(res);
}).catch(err => {
  console.log("Create A PERSON Group: " + err);
});
Amirbahal commented 4 years ago

Thank you for replying @miparnisari I will give try this one. :) And will share if there are issues etc.