{"action":"created","comment":{"url":"https://api.github.com/repos/Kinto/kinto.js/pulls/comments/51026009","id":51026009,"diff_hunk":"@@ -314,7 +314,14 @@ export default class Collection {\n     }\n     return this.db.create(newRecord).then(record => {\n       return {data: record, permissions: {}};\n-    });\n+    })\n+      .catch(err => {\n+        if (options.useRecordId) {","path":"src/collection.js","position":7,"original_position":7,"commit_id":"26dc17b6a9533dc51c135ef093e93c5ce083aa73","original_commit_id":"26dc17b6a9533dc51c135ef093e93c5ce083aa73","user":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"body":"why not check for `record._status === \"deleted\"` instead?","created_at":"2016-01-27T18:23:30Z","updated_at":"2016-01-27T18:23:30Z","html_url":"https://github.com/Kinto/kinto.js/pull/307#discussion_r51026009","pull_request_url":"https://api.github.com/repos/Kinto/kinto.js/pulls/307","_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/comments/51026009"},"html":{"href":"https://github.com/Kinto/kinto.js/pull/307#discussion_r51026009"},"pull_request":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto.js/pulls/307","id":57393913,"html_url":"https://github.com/Kinto/kinto.js/pull/307","diff_url":"https://github.com/Kinto/kinto.js/pull/307.diff","patch_url":"https://github.com/Kinto/kinto.js/pull/307.patch","issue_url":"https://api.github.com/repos/Kinto/kinto.js/issues/307","number":307,"state":"open","locked":false,"title":"Fixes #305: better err message when trying to recreate a virtually deleted record","user":{"login":"n1k0","id":41547,"avatar_url":"https://avatars.githubusercontent.com/u/41547?v=3","gravatar_id":"","url":"https://api.github.com/users/n1k0","html_url":"https://github.com/n1k0","followers_url":"https://api.github.com/users/n1k0/followers","following_url":"https://api.github.com/users/n1k0/following{/other_user}","gists_url":"https://api.github.com/users/n1k0/gists{/gist_id}","starred_url":"https://api.github.com/users/n1k0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1k0/subscriptions","organizations_url":"https://api.github.com/users/n1k0/orgs","repos_url":"https://api.github.com/users/n1k0/repos","events_url":"https://api.github.com/users/n1k0/events{/privacy}","received_events_url":"https://api.github.com/users/n1k0/received_events","type":"User","site_admin":false},"body":"r=? @michielbdejong ","created_at":"2016-01-27T17:29:42Z","updated_at":"2016-01-27T18:23:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e723c493ecadbd55513f174638987c9c39f438e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Kinto/kinto.js/pulls/307/commits","review_comments_url":"https://api.github.com/repos/Kinto/kinto.js/pulls/307/comments","review_comment_url":"https://api.github.com/repos/Kinto/kinto.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/issues/307/comments","statuses_url":"https://api.github.com/repos/Kinto/kinto.js/statuses/26dc17b6a9533dc51c135ef093e93c5ce083aa73","head":{"label":"Kinto:virtual-deletion-docs","ref":"virtual-deletion-docs","sha":"26dc17b6a9533dc51c135ef093e93c5ce083aa73","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":35978199,"name":"kinto.js","full_name":"Kinto/kinto.js","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto.js","description":"A JavaScript client for Kinto.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto.js","forks_url":"https://api.github.com/repos/Kinto/kinto.js/forks","keys_url":"https://api.github.com/repos/Kinto/kinto.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto.js/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto.js/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto.js/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto.js/events","assignees_url":"https://api.github.com/repos/Kinto/kinto.js/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto.js/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto.js/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto.js/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto.js/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto.js/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto.js/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto.js/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto.js/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto.js/merges","archive_url":"https://api.github.com/repos/Kinto/kinto.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto.js/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto.js/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto.js/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto.js/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto.js/deployments","created_at":"2015-05-20T22:46:31Z","updated_at":"2016-01-22T15:10:14Z","pushed_at":"2016-01-27T17:29:43Z","git_url":"git://github.com/Kinto/kinto.js.git","ssh_url":"git@github.com:Kinto/kinto.js.git","clone_url":"https://github.com/Kinto/kinto.js.git","svn_url":"https://github.com/Kinto/kinto.js","homepage":"http://kintojs.readthedocs.org/","size":6976,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":44,"forks":6,"open_issues":44,"watchers":47,"default_branch":"master"}},"base":{"label":"Kinto:master","ref":"master","sha":"b0edc3edd0caf33c0001968982e1b57faa7398f2","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":35978199,"name":"kinto.js","full_name":"Kinto/kinto.js","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto.js","description":"A JavaScript client for Kinto.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto.js","forks_url":"https://api.github.com/repos/Kinto/kinto.js/forks","keys_url":"https://api.github.com/repos/Kinto/kinto.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto.js/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto.js/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto.js/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto.js/events","assignees_url":"https://api.github.com/repos/Kinto/kinto.js/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto.js/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto.js/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto.js/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto.js/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto.js/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto.js/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto.js/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto.js/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto.js/merges","archive_url":"https://api.github.com/repos/Kinto/kinto.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto.js/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto.js/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto.js/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto.js/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto.js/deployments","created_at":"2015-05-20T22:46:31Z","updated_at":"2016-01-22T15:10:14Z","pushed_at":"2016-01-27T17:29:43Z","git_url":"git://github.com/Kinto/kinto.js.git","ssh_url":"git@github.com:Kinto/kinto.js.git","clone_url":"https://github.com/Kinto/kinto.js.git","svn_url":"https://github.com/Kinto/kinto.js","homepage":"http://kintojs.readthedocs.org/","size":6976,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":44,"forks":6,"open_issues":44,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/307"},"html":{"href":"https://github.com/Kinto/kinto.js/pull/307"},"issue":{"href":"https://api.github.com/repos/Kinto/kinto.js/issues/307"},"comments":{"href":"https://api.github.com/repos/Kinto/kinto.js/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kinto/kinto.js/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/Kinto/kinto.js/statuses/26dc17b6a9533dc51c135ef093e93c5ce083aa73"}}}}