Join GitHub today
Foreign languages used in the db might crash the app #3567
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.
added a commit
this pull request
Apr 21, 2015
+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