-
Notifications
You must be signed in to change notification settings - Fork 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
adding in the callback to express package #463
Conversation
…g throughout the application
@chemdrew: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
This looks like a great addition. Thank you very much for this pull request. |
It looks like this change causes #471 because it advances the middleware chain but because the response has been sent to the client it can't be modified. Because this middleware is the endpoint that returns data I believe it shouldn't call |
Any middleware happening post-execution should use the flag |
I posted an example in the issue but I think the common use case that people will hit here is 404 handlers and error handlers. This is a non obvious change that I'm sure a lot of people will hit especially when the express generator creates a 404 handler by default. Here is my example of hitting this error https://gist.github.com/Friss/90604b5f53ad4bb38146a8f49c730c13 |
Fix as simple as this:
|
@freiksenet FWIW calling My suggestion would be to implement calling |
I'm very sorry for breaking your code. This should have been a minor release, not patch. There also seems to be disagreement if that's a best practice, I'll rather we figure out if it is, than make it an option. I'll revert the patch for now and will move a discussion back to the issue #462. |
This is in relation to issue 462
Logic now matches the logic in the Restify package more closely.
TODO: