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

Fix bug where regex fails in error-handler #240

Merged
merged 2 commits into from
Apr 19, 2018
Merged

Fix bug where regex fails in error-handler #240

merged 2 commits into from
Apr 19, 2018

Conversation

cdimitroulas
Copy link
Contributor

Summary

The regex inside the errorHandler does not work correctly for string values. If a Conflict occurs in the database where two string values clash (such as the name "Kate" in the tests) then the value variable was equal to "Kate"" before this fix (please notice the extra double quote in the string).

This PR fixes that issue. The test cases added fail before the modification to the regex.

@cdimitroulas
Copy link
Contributor Author

I am unable to understand why the tests are failing on an unrelated test case to the code I have modified. If someone could explain this to me I am happy to go and make any required changes.

Although I am slightly confused as to how a change in this regular expression could cause the tests to fail so perhaps it's an issue with how I edited the error handler tests...

@daffl
Copy link
Member

daffl commented Apr 19, 2018

Thank you for the pull request @cdimitroulas! Looks like the error was a bug with a later version of MongoDB and how indexes for some tests were set up. It is fixed now so if you pull latest master and push it tests should pass.

@cdimitroulas
Copy link
Contributor Author

cdimitroulas commented Apr 19, 2018

All done!
credit goes to @ThePesta for finding a working regex

@daffl daffl merged commit d7b56f3 into feathersjs-ecosystem:master Apr 19, 2018
@daffl
Copy link
Member

daffl commented Apr 19, 2018

Awesome, thank you. Released as v6.1.1

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

Successfully merging this pull request may close these issues.

2 participants