Fix problem afterError always called - #281
Closed
florianorpeliere wants to merge 1 commit into
Closed
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
Member
|
@slnode ok to test |
Member
|
@florianorpeliere ouch, thank you for reporting the problem and sending a pull request to fix it. Could you please add a unit-test to verify your change? The test should fail with the current implementation and pass with your proposed change in place. |
Member
|
@florianorpeliere I landed a fix myself via #283 to get this regression fixed ASAP. |
Author
|
@bajtos Okay no problem. Sorry I forgot the unit test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello everyone.
I seem to have found a bug in version 2.25.
Indeed, the afterError hook is always called even if there is no error.
https://github.com/strongloop/strong-remoting/blob/2.x-latest/lib/remote-objects.js#L680
In fact,
triggerErrorAndCallBackmethod is always called becausephases.runuseasync.eachSeriesand the documentation explainIn version 2.24 we had this
https://github.com/florianorpeliere/strong-remoting/blob/4d965966f4b860c27a6a42c421c7ea7e9d3696f5/lib/remote-objects.js#L625
So I allowed myself to put this piece of code in a method.
I do not know if the name really fits .
As this is my first contribution , please be indulgent .
Hoping to have helped you .