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

insert/update/remove return values and exceptions should match original collection API #85

Open
mattmccutchen opened this issue Feb 11, 2017 · 1 comment

Comments

@mattmccutchen
Copy link
Collaborator

The return values and exception propagation behavior for insert, update, and remove are currently inconsistent and undocumented. They should be changed to match the original Meteor collection API as far as reasonable.

Perhaps I can throw in here that for other operations that take an optional callback (I'm looking at you, commit), the result or error passed to the callback should be the same as the result returned or the error thrown when no callback is passed.

This might break existing apps. If we identify specific high-impact cases, we can have an option to maintain the old behavior in those cases, but the old behavior is so inconsistent that I think it's going to be unworkable to have code that exactly reproduces either the old behavior or the new behavior depending on an option. Given that the change is an important step in the cleanup of this package that will make future enhancements easier, I think it's reasonable to tell app developers that they have to update their code before they can upgrade this package and benefit from future enhancements.

@JackAdams
Copy link
Owner

I think it's reasonable too, with a note in the CHANGELOG or README that backwards compatibility might be affected. I'm pretty ignorant about the right way to handle and propagate errors. Wide open to PRs on this.

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