{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/1417","repository_url":"https://api.github.com/repos/tgriesser/knex","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/1417/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/1417/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/1417/events","html_url":"https://github.com/tgriesser/knex/pull/1417","id":155075826,"number":1417,"title":"Proper error message for undefined where options","user":{"login":"mdrmuhaimin","id":418264,"avatar_url":"https://avatars.githubusercontent.com/u/418264?v=3","gravatar_id":"","url":"https://api.github.com/users/mdrmuhaimin","html_url":"https://github.com/mdrmuhaimin","followers_url":"https://api.github.com/users/mdrmuhaimin/followers","following_url":"https://api.github.com/users/mdrmuhaimin/following{/other_user}","gists_url":"https://api.github.com/users/mdrmuhaimin/gists{/gist_id}","starred_url":"https://api.github.com/users/mdrmuhaimin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdrmuhaimin/subscriptions","organizations_url":"https://api.github.com/users/mdrmuhaimin/orgs","repos_url":"https://api.github.com/users/mdrmuhaimin/repos","events_url":"https://api.github.com/users/mdrmuhaimin/events{/privacy}","received_events_url":"https://api.github.com/users/mdrmuhaimin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-16T17:14:40Z","updated_at":"2016-05-18T13:27:24Z","closed_at":"2016-05-18T05:45:54Z","pull_request":{"url":"https://api.github.com/repos/tgriesser/knex/pulls/1417","html_url":"https://github.com/tgriesser/knex/pull/1417","diff_url":"https://github.com/tgriesser/knex/pull/1417.diff","patch_url":"https://github.com/tgriesser/knex/pull/1417.patch"},"body":"When user provides a knex select statement with an undefined options in where clause it is not properly handled an give an ambiguous error message telling `Unhandled rejection TypeError: Cannot read property 'toString' of undefined.` This PR will helpful to users at it will tell them the exact problem."},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/220025317","html_url":"https://github.com/tgriesser/knex/pull/1417#issuecomment-220025317","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/1417","id":220025317,"user":{"login":"agdevbridge","id":9077286,"avatar_url":"https://avatars.githubusercontent.com/u/9077286?v=3","gravatar_id":"","url":"https://api.github.com/users/agdevbridge","html_url":"https://github.com/agdevbridge","followers_url":"https://api.github.com/users/agdevbridge/followers","following_url":"https://api.github.com/users/agdevbridge/following{/other_user}","gists_url":"https://api.github.com/users/agdevbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/agdevbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agdevbridge/subscriptions","organizations_url":"https://api.github.com/users/agdevbridge/orgs","repos_url":"https://api.github.com/users/agdevbridge/repos","events_url":"https://api.github.com/users/agdevbridge/events{/privacy}","received_events_url":"https://api.github.com/users/agdevbridge/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T13:27:24Z","updated_at":"2016-05-18T13:27:24Z","body":"@elhigu yes i have, undefined fields in insert/update causes exception when using transaction.\r\nFor example:\r\n```javascript\r\nknex.transaction(function (tr) {\r\n    return knex('users').transacting(tr)\r\n        .insert({email: 'a@example.com'})\r\n        .insert({email: 'b@example.com', age: undefined});\r\n}).then(function () {\r\n    console.log('OK');\r\n}).catch(function (err) {\r\n    console.log('Fail', err);\r\n});\r\n```\r\nResult:\r\n```\r\nfail [TypeError: Cannot read property 'toString' of undefined]\r\n```"}}