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

Callbacks do not receive error as the first argument #11

Open
mitar opened this issue Oct 25, 2015 · 1 comment
Open

Callbacks do not receive error as the first argument #11

mitar opened this issue Oct 25, 2015 · 1 comment

Comments

@mitar
Copy link
Contributor

mitar commented Oct 25, 2015

It is common in node.js callbacks that the first argument is an error, if there is any. Callbacks in this package receive data. This is really confusing.

On the other hand, how does one detect that there was an error when calling a command?

@royvandewater
Copy link
Contributor

I absolutely agree. We would love to modify the callbacks to do standard node error callbacks, but lots of projects depend on the current API. Our newer npm modules take the error callback approach, for example: https://github.com/octoblu/node-meshblu-http and https://github.com/octoblu/node-meshblu-socket.io

The latter will eventually replace meshblu-npm, but it currently only implements a handful of functions (identity & update)

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

2 participants