Skip to content

returned error from membershipAdd is not object #16

Description

@pkubat

Example of working error:

spark.personGet('Y2lzY29zcGFyaMWU4LWI1MzQtZDM3YjY1MzYzNjhl]', '1234')
  .then(result => {
    console.log('Good:', result);
  })
  .catch(error => {
    console.log(JSON.stringify(error, null, 2));  // ​​​​​{​​​​​​​  "code": 404,​​​​​​​​​​  "type": "ERR_STATUS"​​​​​ ​​​​​}​​​​​
    console.log(typeof error); // object
    console.log('Array? ', Array.isArray(error)); // false
    console.log(error);  { [Error: recieved error 404 for a GET request to https://api.ciscospark.com/v1/people/Y2lzY29zcGFyaMWU4LWI1MzQtZDM3YjY1MzYzNjhl] code: 404, type: 'ERR_STATUS' 
   })

membershipAdd result error not an object

spark.membershipAdd(spaceId, '1234')
  .then(result => {
    console.log('Good:', result);
  })
  .catch(error => {
    console.log(JSON.stringify(error, null, 2));  // {}
    console.log(typeof error); // object
    console.log(Array.isArray(error));  //false
    console.log(error); // [Error: invalid arguments]​​​​​
   })

Sorry that I did not have the time to dig further.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions