Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returned error from membershipAdd is not object #16

Open
pkubat opened this issue May 2, 2018 · 0 comments
Open

returned error from membershipAdd is not object #16

pkubat opened this issue May 2, 2018 · 0 comments
Assignees
Labels

Comments

@pkubat
Copy link

pkubat commented May 2, 2018

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.

@nmarus nmarus closed this as completed May 8, 2018
@nmarus nmarus reopened this May 8, 2018
@nmarus nmarus added the bug label May 8, 2018
@nmarus nmarus self-assigned this May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants