{"action":"closed","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4189","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4189/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4189/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4189/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/4189","id":73503390,"number":4189,"title":"reduce with an inappropriate function throws the wrong error","user":{"login":"neumino","id":1461947,"avatar_url":"https://avatars.githubusercontent.com/u/1461947?v=3","gravatar_id":"","url":"https://api.github.com/users/neumino","html_url":"https://github.com/neumino","followers_url":"https://api.github.com/users/neumino/followers","following_url":"https://api.github.com/users/neumino/following{/other_user}","gists_url":"https://api.github.com/users/neumino/gists{/gist_id}","starred_url":"https://api.github.com/users/neumino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neumino/subscriptions","organizations_url":"https://api.github.com/users/neumino/orgs","repos_url":"https://api.github.com/users/neumino/repos","events_url":"https://api.github.com/users/neumino/events{/privacy}","received_events_url":"https://api.github.com/users/neumino/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/good_for_contributors","name":"good_for_contributors","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/2","html_url":"https://github.com/rethinkdb/rethinkdb/milestones/backlog","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/2/labels","id":211054,"number":2,"title":"backlog","description":"Issues in this milestone are not an immediate priority, and will be periodically revisited. When we decide to work on an issue in backlog, we'll move it to next.","creator":{"login":"coffeemug","id":48436,"avatar_url":"https://avatars.githubusercontent.com/u/48436?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeemug","html_url":"https://github.com/coffeemug","followers_url":"https://api.github.com/users/coffeemug/followers","following_url":"https://api.github.com/users/coffeemug/following{/other_user}","gists_url":"https://api.github.com/users/coffeemug/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeemug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeemug/subscriptions","organizations_url":"https://api.github.com/users/coffeemug/orgs","repos_url":"https://api.github.com/users/coffeemug/repos","events_url":"https://api.github.com/users/coffeemug/events{/privacy}","received_events_url":"https://api.github.com/users/coffeemug/received_events","type":"User","site_admin":false},"open_issues":451,"closed_issues":1,"state":"open","created_at":"2012-11-11T14:16:11Z","updated_at":"2015-08-15T21:31:18Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-05-06T03:35:52Z","updated_at":"2015-08-15T21:31:18Z","closed_at":"2015-08-15T21:31:18Z","body":"```\r\nr.expr([1,2,3]).reduce(function(left) {\r\n  return left\r\n})\r\n// Throws\r\nRqlRuntimeError: Expected 1 argument but found 2 in:\r\n// Instead of `RqlRuntimeError: Expected 2 arguments but found 1 in:`\r\n\r\nr.expr([1,2,3]).reduce(function(left, right, extra) {\r\n  return left\r\n})\r\n//Throws\r\nRqlRuntimeError: Expected 3 arguments but found 2 in:\r\n// Instead of `RqlRuntimeError: Expected 2 arguments but found 3 in:`\r\n```"}}