-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The article middleware was calling getErrorMessage with a null argume…
…nt, causing a crash when this method tried to access 'code' on an null parameter. The bug was not exposed by the original test, since it was mixing two (related) aspects: * An invalid Id (a badly formed mongodb identifier) * An non-existent Id (an identifier with no corresponding document in the database) Modifications: - Fixed the message property in the article controller (the error message follows the wording of the error message in "users.password.server.controller.js", in case of username not found) - Added a new test to check modifications and avoid regressions
- Loading branch information
1 parent
0369db4
commit 71167b0
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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