-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Throw error if cursor is returned from a method #5382
Comments
no, in the example i have posted, i didn't receive any error on the server, On Thu, Oct 8, 2015 at 11:02 AM, Sashko Stubailo notifications@github.com
|
+1 Same here.. findOne() returns triggers the callback but returning a cursor ( using find() ) there is no callback triggered. The below are the scenarios I have tested:
EDIT : Also tested to just fire the "find" on the client side and it works fine.
I feel strongly that there might be an issue triggering the callback from a meteor method. @peonmodel did you manage to resolve this issue? |
No, i did not, still awaiting a reply from the meteor team |
@peonmodel right.. I went for the same approach, if I need to return a cursor, I will do it in the helper itself. Hopefully this gets fixed soon. I tried to find the source code for the method call but so far haven't found it |
Yeah, returning a cursor from a method should throw an error, since cursors are not serializable. |
Can someone confirm that returning anything that is non-serializable results in a silent error? |
@peonmodel I can't access your repro |
@zol i created a new repo: https://github.com/peonmodel/musical-journey on client-side
on server-side
|
Thanks! |
Still an issue with meteor 1.4.2.1 |
To help provide a more clear separation between feature requests and bugs, and to help clean up the feature request backlog, Meteor feature requests are now being managed under the https://github.com/meteor/meteor-feature-requests repository. This feature request will be closed here, but anyone interested in migrating this feature request to the new repository (to make sure it stays active), can click here to start the feature request migration process. This manual migration process is intended to help identify which of the older feature requests are still considered to be of value to the community. Thanks! |
_1 Upvote_ repro here: https://github.com/peonmodel/adamant-waffle
basically is a server side meteor method is returning a cursor, the client side callback will not get called at all
it doesnt quite make sense to return a cursor from a method, but it is an easy mistake to make mistyping 'findOne' as 'find'
i would expect the error callback to get triggered instead of failing silently
The text was updated successfully, but these errors were encountered: