Foreign languages used in the db might crash the app#3567
Merged
janmeier merged 1 commit intosequelize:masterfrom Apr 21, 2015
fintura:fix-error-msg
Merged
Foreign languages used in the db might crash the app#3567janmeier merged 1 commit intosequelize:masterfrom fintura:fix-error-msg
janmeier merged 1 commit intosequelize:masterfrom
fintura:fix-error-msg
Conversation
janmeier
added a commit
that referenced
this pull request
Apr 21, 2015
Foreign languages used in the db might crash the app
Member
|
+1 for hotfix :) I'm pretty sure there is no better solution for this, at least not at the sequelize level. Maybe if the DB actually returned the information we need, instead of just strings, but then some handling would need to be implemented at the driver level as well |
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.
The error messages are not parsed in a multi language friendly way. If the database in use is not english, error messages are checked with a match that might fail. This fixes the app crash.
This is definitly not a very good solution but more a kind of a hotfix. After all some time should be invested to check if there's a better solution. I couldn't come up with a good regression test for this either. Probably the best way to write a regression test for this is to fake each error with a foreign language. I do not have the time for that right now though.