{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/23212786","id":23212786,"diff_hunk":"@@ -109,6 +109,13 @@ def test_invalid_record_raises_error(self):\n                                   status=400)\n         self.assertIn('errors', resp.json)\n \n+    def test_create_with_invalid_json(self):\n+        body = \"{'foo': 'bad json'}\"\n+        self.app.post(self.collection_url,\n+                      body,\n+                      headers=self.headers,\n+                      status=400)","path":"readinglist/tests/support.py","position":9,"original_position":9,"commit_id":"30726d76ce7d1a3fd886506767cad2dfa9bdaf10","original_commit_id":"30726d76ce7d1a3fd886506767cad2dfa9bdaf10","user":{"login":"ametaireau","id":67073,"avatar_url":"https://avatars.githubusercontent.com/u/67073?v=3","gravatar_id":"","url":"https://api.github.com/users/ametaireau","html_url":"https://github.com/ametaireau","followers_url":"https://api.github.com/users/ametaireau/followers","following_url":"https://api.github.com/users/ametaireau/following{/other_user}","gists_url":"https://api.github.com/users/ametaireau/gists{/gist_id}","starred_url":"https://api.github.com/users/ametaireau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ametaireau/subscriptions","organizations_url":"https://api.github.com/users/ametaireau/orgs","repos_url":"https://api.github.com/users/ametaireau/repos","events_url":"https://api.github.com/users/ametaireau/events{/privacy}","received_events_url":"https://api.github.com/users/ametaireau/received_events","type":"User","site_admin":false},"body":"We probably should test what's the content of the 400","created_at":"2015-01-20T10:13:13Z","updated_at":"2015-01-20T10:13:13Z","html_url":"https://github.com/mozilla-services/readinglist/pull/49#discussion_r23212786","pull_request_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/23212786"},"html":{"href":"https://github.com/mozilla-services/readinglist/pull/49#discussion_r23212786"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49","id":27659071,"html_url":"https://github.com/mozilla-services/readinglist/pull/49","diff_url":"https://github.com/mozilla-services/readinglist/pull/49.diff","patch_url":"https://github.com/mozilla-services/readinglist/pull/49.patch","issue_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/49","number":49,"state":"open","locked":false,"title":"Return 400 on invalid JSON","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars.githubusercontent.com/u/546692?v=3","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-20T07:48:41Z","updated_at":"2015-01-20T10:13:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b11c3dd708efa30ea24a08d87699c2c14016f342","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/49/comments","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/30726d76ce7d1a3fd886506767cad2dfa9bdaf10","head":{"label":"mozilla-services:support-bad-json-on-patch","ref":"support-bad-json-on-patch","sha":"30726d76ce7d1a3fd886506767cad2dfa9bdaf10","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":27563721,"name":"readinglist","full_name":"mozilla-services/readinglist","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/readinglist","description":"Reading List Server","fork":false,"url":"https://api.github.com/repos/mozilla-services/readinglist","forks_url":"https://api.github.com/repos/mozilla-services/readinglist/forks","keys_url":"https://api.github.com/repos/mozilla-services/readinglist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/readinglist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/readinglist/teams","hooks_url":"https://api.github.com/repos/mozilla-services/readinglist/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/readinglist/events","assignees_url":"https://api.github.com/repos/mozilla-services/readinglist/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/readinglist/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/readinglist/tags","blobs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/readinglist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/readinglist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/readinglist/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/readinglist/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/readinglist/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/readinglist/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/readinglist/subscription","commits_url":"https://api.github.com/repos/mozilla-services/readinglist/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/readinglist/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-services/readinglist/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/readinglist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/readinglist/merges","archive_url":"https://api.github.com/repos/mozilla-services/readinglist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/readinglist/downloads","issues_url":"https://api.github.com/repos/mozilla-services/readinglist/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/readinglist/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/readinglist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/readinglist/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/readinglist/releases{/id}","created_at":"2014-12-04T22:48:28Z","updated_at":"2015-01-19T12:26:53Z","pushed_at":"2015-01-20T10:02:41Z","git_url":"git://github.com/mozilla-services/readinglist.git","ssh_url":"git@github.com:mozilla-services/readinglist.git","clone_url":"https://github.com/mozilla-services/readinglist.git","svn_url":"https://github.com/mozilla-services/readinglist","homepage":null,"size":1016,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":32,"forks":0,"open_issues":32,"watchers":3,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"b7100ec9836050923026dc149396759fcbdf1d2d","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":27563721,"name":"readinglist","full_name":"mozilla-services/readinglist","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/readinglist","description":"Reading List Server","fork":false,"url":"https://api.github.com/repos/mozilla-services/readinglist","forks_url":"https://api.github.com/repos/mozilla-services/readinglist/forks","keys_url":"https://api.github.com/repos/mozilla-services/readinglist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/readinglist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/readinglist/teams","hooks_url":"https://api.github.com/repos/mozilla-services/readinglist/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/readinglist/events","assignees_url":"https://api.github.com/repos/mozilla-services/readinglist/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/readinglist/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/readinglist/tags","blobs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/readinglist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/readinglist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/readinglist/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/readinglist/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/readinglist/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/readinglist/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/readinglist/subscription","commits_url":"https://api.github.com/repos/mozilla-services/readinglist/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/readinglist/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-services/readinglist/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/readinglist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/readinglist/merges","archive_url":"https://api.github.com/repos/mozilla-services/readinglist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/readinglist/downloads","issues_url":"https://api.github.com/repos/mozilla-services/readinglist/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/readinglist/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/readinglist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/readinglist/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/readinglist/releases{/id}","created_at":"2014-12-04T22:48:28Z","updated_at":"2015-01-19T12:26:53Z","pushed_at":"2015-01-20T10:02:41Z","git_url":"git://github.com/mozilla-services/readinglist.git","ssh_url":"git@github.com:mozilla-services/readinglist.git","clone_url":"https://github.com/mozilla-services/readinglist.git","svn_url":"https://github.com/mozilla-services/readinglist","homepage":null,"size":1016,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":32,"forks":0,"open_issues":32,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49"},"html":{"href":"https://github.com/mozilla-services/readinglist/pull/49"},"issue":{"href":"https://api.github.com/repos/mozilla-services/readinglist/issues/49"},"comments":{"href":"https://api.github.com/repos/mozilla-services/readinglist/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/readinglist/statuses/30726d76ce7d1a3fd886506767cad2dfa9bdaf10"}}}}