{"action":"created","issue":{"url":"https://api.github.com/repos/neumino/thinky/issues/487","repository_url":"https://api.github.com/repos/neumino/thinky","labels_url":"https://api.github.com/repos/neumino/thinky/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/neumino/thinky/issues/487/comments","events_url":"https://api.github.com/repos/neumino/thinky/issues/487/events","html_url":"https://github.com/neumino/thinky/issues/487","id":151257724,"number":487,"title":"removeRelation does not throw DocumentNotFound","user":{"login":"gjuchault","id":678848,"avatar_url":"https://avatars.githubusercontent.com/u/678848?v=3","gravatar_id":"","url":"https://api.github.com/users/gjuchault","html_url":"https://github.com/gjuchault","followers_url":"https://api.github.com/users/gjuchault/followers","following_url":"https://api.github.com/users/gjuchault/following{/other_user}","gists_url":"https://api.github.com/users/gjuchault/gists{/gist_id}","starred_url":"https://api.github.com/users/gjuchault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjuchault/subscriptions","organizations_url":"https://api.github.com/users/gjuchault/orgs","repos_url":"https://api.github.com/users/gjuchault/repos","events_url":"https://api.github.com/users/gjuchault/events{/privacy}","received_events_url":"https://api.github.com/users/gjuchault/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T22:49:23Z","updated_at":"2016-05-14T18:02:49Z","closed_at":null,"body":"When you use removeRelation on a non-existant model, the user thrown is `ReqlUserError` but not a `DocumentNotFound`.\r\n\r\n```\r\n{ [ReqlUserError: The query did not find a document and returned null in:\r\n   r.table(\"Group\").get(\"00000000-0000-1000-8000-000000000000\").default(r.error(\"The query did not find a document and returned null.\"))(\"id\").do(function(var_1338) {\r\n                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               \r\n       return r.table(\"Group_User\").getAll(var_1338.add(\"_\").add(\"00000000-0000-1000-8000-000000000000\"))\r\n           .delete()\r\n   })\r\n   ]\r\n     [stack]: [Getter/Setter],\r\n     message: 'The query did not find a document and returned null in:\\nr.table(\"Group\").get(\"00000000-0000-1000-8000-000000000000\").default(r.error(\"The query did not find a document and returned null.\"))(\"id\").do(function(var_1338) {\\n                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               \\n    return r.table(\"Group_User\").getAll(var_1338.add(\"_\").add(\"00000000-0000-1000-8000-000000000000\"))\\n        .delete()\\n})\\n',\r\n     frames: [ 1, 0, 1, [length]: 3 ],\r\n     name: 'ReqlUserError' }\r\n```"},"comment":{"url":"https://api.github.com/repos/neumino/thinky/issues/comments/219234454","html_url":"https://github.com/neumino/thinky/issues/487#issuecomment-219234454","issue_url":"https://api.github.com/repos/neumino/thinky/issues/487","id":219234454,"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},"created_at":"2016-05-14T18:02:49Z","updated_at":"2016-05-14T18:02:49Z","body":"Yea, I think we just need to wrap errors in case a post validation is required"}}