{"action":"closed","number":594,"pull_request":{"url":"https://api.github.com/repos/tgriesser/knex/pulls/594","id":26027365,"html_url":"https://github.com/tgriesser/knex/pull/594","diff_url":"https://github.com/tgriesser/knex/pull/594.diff","patch_url":"https://github.com/tgriesser/knex/pull/594.patch","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/594","number":594,"state":"closed","locked":false,"title":"Add 'Error' event should a query fail.","user":{"login":"wubzz","id":10179061,"avatar_url":"https://avatars.githubusercontent.com/u/10179061?v=3","gravatar_id":"","url":"https://api.github.com/users/wubzz","html_url":"https://github.com/wubzz","followers_url":"https://api.github.com/users/wubzz/followers","following_url":"https://api.github.com/users/wubzz/following{/other_user}","gists_url":"https://api.github.com/users/wubzz/gists{/gist_id}","starred_url":"https://api.github.com/users/wubzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wubzz/subscriptions","organizations_url":"https://api.github.com/users/wubzz/orgs","repos_url":"https://api.github.com/users/wubzz/repos","events_url":"https://api.github.com/users/wubzz/events{/privacy}","received_events_url":"https://api.github.com/users/wubzz/received_events","type":"User","site_admin":false},"body":"In reference to Issue #593 , rather than requesting, figured I'd do pull request..\r\n\r\nTested on Postgresql, should work on rest. Purpose is to be able to listen on query errors should they occur, so that it can be used for logging purposes rather than placing your log-logic in the promise-reject/callback() functions of each Runner.query call. Convenient, and less code.\r\n\r\nIE:\r\nknex.on('error', myQueryErrorHandler);","created_at":"2014-12-13T22:33:45Z","updated_at":"2016-01-27T21:27:22Z","closed_at":"2016-01-27T21:27:22Z","merged_at":null,"merge_commit_sha":"ce31d3627516184acda8d028cdf28d12a2ed407b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgriesser/knex/pulls/594/commits","review_comments_url":"https://api.github.com/repos/tgriesser/knex/pulls/594/comments","review_comment_url":"https://api.github.com/repos/tgriesser/knex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/594/comments","statuses_url":"https://api.github.com/repos/tgriesser/knex/statuses/421adcd3efa9a185fb9d19e8c92869941fa1b644","head":{"label":"wubzz:wubz","ref":"wubz","sha":"421adcd3efa9a185fb9d19e8c92869941fa1b644","user":{"login":"wubzz","id":10179061,"avatar_url":"https://avatars.githubusercontent.com/u/10179061?v=3","gravatar_id":"","url":"https://api.github.com/users/wubzz","html_url":"https://github.com/wubzz","followers_url":"https://api.github.com/users/wubzz/followers","following_url":"https://api.github.com/users/wubzz/following{/other_user}","gists_url":"https://api.github.com/users/wubzz/gists{/gist_id}","starred_url":"https://api.github.com/users/wubzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wubzz/subscriptions","organizations_url":"https://api.github.com/users/wubzz/orgs","repos_url":"https://api.github.com/users/wubzz/repos","events_url":"https://api.github.com/users/wubzz/events{/privacy}","received_events_url":"https://api.github.com/users/wubzz/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"tgriesser:master","ref":"master","sha":"647393c9e13a43b6b1e420e9570fea83c43291b2","user":{"login":"tgriesser","id":154748,"avatar_url":"https://avatars.githubusercontent.com/u/154748?v=3","gravatar_id":"","url":"https://api.github.com/users/tgriesser","html_url":"https://github.com/tgriesser","followers_url":"https://api.github.com/users/tgriesser/followers","following_url":"https://api.github.com/users/tgriesser/following{/other_user}","gists_url":"https://api.github.com/users/tgriesser/gists{/gist_id}","starred_url":"https://api.github.com/users/tgriesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgriesser/subscriptions","organizations_url":"https://api.github.com/users/tgriesser/orgs","repos_url":"https://api.github.com/users/tgriesser/repos","events_url":"https://api.github.com/users/tgriesser/events{/privacy}","received_events_url":"https://api.github.com/users/tgriesser/received_events","type":"User","site_admin":false},"repo":{"id":7363211,"name":"knex","full_name":"tgriesser/knex","owner":{"login":"tgriesser","id":154748,"avatar_url":"https://avatars.githubusercontent.com/u/154748?v=3","gravatar_id":"","url":"https://api.github.com/users/tgriesser","html_url":"https://github.com/tgriesser","followers_url":"https://api.github.com/users/tgriesser/followers","following_url":"https://api.github.com/users/tgriesser/following{/other_user}","gists_url":"https://api.github.com/users/tgriesser/gists{/gist_id}","starred_url":"https://api.github.com/users/tgriesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgriesser/subscriptions","organizations_url":"https://api.github.com/users/tgriesser/orgs","repos_url":"https://api.github.com/users/tgriesser/repos","events_url":"https://api.github.com/users/tgriesser/events{/privacy}","received_events_url":"https://api.github.com/users/tgriesser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgriesser/knex","description":"A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.","fork":false,"url":"https://api.github.com/repos/tgriesser/knex","forks_url":"https://api.github.com/repos/tgriesser/knex/forks","keys_url":"https://api.github.com/repos/tgriesser/knex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgriesser/knex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgriesser/knex/teams","hooks_url":"https://api.github.com/repos/tgriesser/knex/hooks","issue_events_url":"https://api.github.com/repos/tgriesser/knex/issues/events{/number}","events_url":"https://api.github.com/repos/tgriesser/knex/events","assignees_url":"https://api.github.com/repos/tgriesser/knex/assignees{/user}","branches_url":"https://api.github.com/repos/tgriesser/knex/branches{/branch}","tags_url":"https://api.github.com/repos/tgriesser/knex/tags","blobs_url":"https://api.github.com/repos/tgriesser/knex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgriesser/knex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgriesser/knex/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgriesser/knex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgriesser/knex/statuses/{sha}","languages_url":"https://api.github.com/repos/tgriesser/knex/languages","stargazers_url":"https://api.github.com/repos/tgriesser/knex/stargazers","contributors_url":"https://api.github.com/repos/tgriesser/knex/contributors","subscribers_url":"https://api.github.com/repos/tgriesser/knex/subscribers","subscription_url":"https://api.github.com/repos/tgriesser/knex/subscription","commits_url":"https://api.github.com/repos/tgriesser/knex/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgriesser/knex/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgriesser/knex/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgriesser/knex/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgriesser/knex/contents/{+path}","compare_url":"https://api.github.com/repos/tgriesser/knex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgriesser/knex/merges","archive_url":"https://api.github.com/repos/tgriesser/knex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgriesser/knex/downloads","issues_url":"https://api.github.com/repos/tgriesser/knex/issues{/number}","pulls_url":"https://api.github.com/repos/tgriesser/knex/pulls{/number}","milestones_url":"https://api.github.com/repos/tgriesser/knex/milestones{/number}","notifications_url":"https://api.github.com/repos/tgriesser/knex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgriesser/knex/labels{/name}","releases_url":"https://api.github.com/repos/tgriesser/knex/releases{/id}","deployments_url":"https://api.github.com/repos/tgriesser/knex/deployments","created_at":"2012-12-29T05:18:25Z","updated_at":"2016-01-27T13:41:51Z","pushed_at":"2016-01-27T14:53:15Z","git_url":"git://github.com/tgriesser/knex.git","ssh_url":"git@github.com:tgriesser/knex.git","clone_url":"https://github.com/tgriesser/knex.git","svn_url":"https://github.com/tgriesser/knex","homepage":"knexjs.org","size":6444,"stargazers_count":2341,"watchers_count":2341,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":341,"mirror_url":null,"open_issues_count":311,"forks":341,"open_issues":311,"watchers":2341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/594"},"html":{"href":"https://github.com/tgriesser/knex/pull/594"},"issue":{"href":"https://api.github.com/repos/tgriesser/knex/issues/594"},"comments":{"href":"https://api.github.com/repos/tgriesser/knex/issues/594/comments"},"review_comments":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/594/comments"},"review_comment":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/594/commits"},"statuses":{"href":"https://api.github.com/repos/tgriesser/knex/statuses/421adcd3efa9a185fb9d19e8c92869941fa1b644"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":6,"review_comments":0,"commits":3,"additions":35,"deletions":7,"changed_files":7}}