add a more informative error message (#6915)
right now this is basically impossible to track down the root. this PR adds a more informative error message so you actually know what caused the error. Before: ``` TypeError: sql.replace is not a function at Object.format (/Users/contra/Projects/staeco/node_modules/sequelize/lib/sql-string.js:87:14) at Object.format (/Users/contra/Projects/staeco/node_modules/sequelize/lib/utils.js:119:20) at Object.getWhereConditions (/Users/contra/Projects/staeco/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2303:24) ``` After: ```js Error: Invalid SQL string provided: ST_Intersects(123) at Object.format (/Users/contra/Projects/staeco/node_modules/sequelize/lib/sql-string.js:87:14) at Object.format (/Users/contra/Projects/staeco/node_modules/sequelize/lib/utils.js:119:20) at Object.getWhereConditions (/Users/contra/Projects/staeco/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2303:24) ```
Showing
with
4 additions
and
1 deletions
-
Please register or sign in to post a comment