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

Module returns undefined, when there is an asana error #1

Open
rewop opened this issue Aug 30, 2016 · 0 comments
Open

Module returns undefined, when there is an asana error #1

rewop opened this issue Aug 30, 2016 · 0 comments

Comments

@rewop
Copy link

rewop commented Aug 30, 2016

I have encountered a problem with asana. I was creating a task in a project that doesn't exist.

However, when I use the client, the request would return undefined in case of errors.

asana.addTask({
    workspace   : config.asana.workspace,
    name        : params.title,
    notes       : params.description,
    projects    : params.project ? [params.project] : params.projects,
    assignee    : params.assignee
})
.then(res => {
    console.log(res); // undefined
});

I looked into the code, and I noticed that asana returns errors in an errors property.

However the module just returns the object, and doesn't manage errors.

This behavior should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant