-
Notifications
You must be signed in to change notification settings - Fork 18
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
getAttribute doesn't fire callback if attribute isn't found. #8
Comments
I'm not against adding an I don't think I will work on this kind of change shortly, but I'm open to PRs. Anyway, could you give me a failing example? |
Sorry it took me a long time to follow up, but I had a sample that was something like this. https://gist.github.com/Setheck/b52e8cea4b582c7b08e9 I removed my actual jmx information for obvious reasons, $ node test.js I was expecting to be able to do some handling when the attribute doesn't exist, but the error never fires, likewise the callback never fires as well. so my client.getAttribute call just falls into the ether. e: replaced code with gist to make it cleaner. |
Having same issue. When trying to get an attribute that does not exist, nothing happens. I struggled like 2 days until I found out a typo. Probably triggering 'on error' should suffice to handle this scenario properly. |
It seems to fire for me just fine. But I still think there should also be a way to detect the error in the callback. Even if it fires, the 'global' error handler doesn't really have the ability to determine reliably which precise operation invocation failed. So all it really is good for is logging some error in a file or console, but its not very well suited to allow to handle the failure of the operation in a more meaningful way. |
I'm finding that if i try to retrieve an attribute that doesn't exist, nothing happens. My callback just doesn't fire. Is this by design? It seems like it would make more sense to follow the nodejs callback paradigm where all callbacks fire with error and data parameters instead.
E: I should also mention that the error event doesn't fire in this case either.
Thanks,
The text was updated successfully, but these errors were encountered: