{"action":"opened","number":544,"pull_request":{"url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544","id":79349660,"html_url":"https://github.com/alphagov/gds-api-adapters/pull/544","diff_url":"https://github.com/alphagov/gds-api-adapters/pull/544.diff","patch_url":"https://github.com/alphagov/gds-api-adapters/pull/544.patch","issue_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/544","number":544,"state":"open","locked":false,"title":"Add option to always raise for 404s","user":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"body":"This commit adds an option to ensure that the publishing-api and content-store clients raise a `GdsApi::NotFound` error when the server returns a 404 (Not Found) or 410 (Gone).\r\n\r\nThis was previously only the case for some methods. In some cases a pattern was to have a `bang!` method and a non-`bang!` method, so that the client could opt-in to this behaviour. Clients like Rummager use the `get_json!` method exclusively.\r\n\r\nReasons to change:\r\n\r\n- This makes the behaviour consistent across the most used clients (publishing-api, content-store and rummager)\r\n- Less duplication between `bang!` and `non_bang` methods.\r\n- Makes it less likely that we inadvertently introduce nils, which generate errors that are hard to spot and to debug.\r\n\r\nTo keep backwards compatibility, we make this opt-in behaviour, providing a friendlier upgrade path.\r\n\r\nFollow up from https://github.com/alphagov/gds-api-adapters/pull/526\r\n\r\n","created_at":"2016-07-29T12:09:48Z","updated_at":"2016-07-29T12:09:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dacb0afd00b07cada1eef1c21431615e3a1c1820","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544/commits","review_comments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544/comments","review_comment_url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/544/comments","statuses_url":"https://api.github.com/repos/alphagov/gds-api-adapters/statuses/99081a0760e779ffcbfa4ff04d2818f35cceb070","head":{"label":"alphagov:option-to-raise","ref":"option-to-raise","sha":"99081a0760e779ffcbfa4ff04d2818f35cceb070","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2898846,"name":"gds-api-adapters","full_name":"alphagov/gds-api-adapters","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/gds-api-adapters","description":"A set of API adapters to work with the GDS APIs","fork":false,"url":"https://api.github.com/repos/alphagov/gds-api-adapters","forks_url":"https://api.github.com/repos/alphagov/gds-api-adapters/forks","keys_url":"https://api.github.com/repos/alphagov/gds-api-adapters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/gds-api-adapters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/gds-api-adapters/teams","hooks_url":"https://api.github.com/repos/alphagov/gds-api-adapters/hooks","issue_events_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/gds-api-adapters/events","assignees_url":"https://api.github.com/repos/alphagov/gds-api-adapters/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/gds-api-adapters/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/gds-api-adapters/tags","blobs_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/gds-api-adapters/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/gds-api-adapters/languages","stargazers_url":"https://api.github.com/repos/alphagov/gds-api-adapters/stargazers","contributors_url":"https://api.github.com/repos/alphagov/gds-api-adapters/contributors","subscribers_url":"https://api.github.com/repos/alphagov/gds-api-adapters/subscribers","subscription_url":"https://api.github.com/repos/alphagov/gds-api-adapters/subscription","commits_url":"https://api.github.com/repos/alphagov/gds-api-adapters/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/gds-api-adapters/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/gds-api-adapters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/gds-api-adapters/merges","archive_url":"https://api.github.com/repos/alphagov/gds-api-adapters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/gds-api-adapters/downloads","issues_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/gds-api-adapters/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/gds-api-adapters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/gds-api-adapters/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/gds-api-adapters/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/deployments","created_at":"2011-12-02T14:13:57Z","updated_at":"2016-05-07T23:50:12Z","pushed_at":"2016-07-29T12:09:48Z","git_url":"git://github.com/alphagov/gds-api-adapters.git","ssh_url":"git@github.com:alphagov/gds-api-adapters.git","clone_url":"https://github.com/alphagov/gds-api-adapters.git","svn_url":"https://github.com/alphagov/gds-api-adapters","homepage":"","size":1489,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":4,"forks":8,"open_issues":4,"watchers":7,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"aff6897d53ca28980b5da0d409211c9702f06ca9","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2898846,"name":"gds-api-adapters","full_name":"alphagov/gds-api-adapters","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/gds-api-adapters","description":"A set of API adapters to work with the GDS APIs","fork":false,"url":"https://api.github.com/repos/alphagov/gds-api-adapters","forks_url":"https://api.github.com/repos/alphagov/gds-api-adapters/forks","keys_url":"https://api.github.com/repos/alphagov/gds-api-adapters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/gds-api-adapters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/gds-api-adapters/teams","hooks_url":"https://api.github.com/repos/alphagov/gds-api-adapters/hooks","issue_events_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/gds-api-adapters/events","assignees_url":"https://api.github.com/repos/alphagov/gds-api-adapters/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/gds-api-adapters/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/gds-api-adapters/tags","blobs_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/gds-api-adapters/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/gds-api-adapters/languages","stargazers_url":"https://api.github.com/repos/alphagov/gds-api-adapters/stargazers","contributors_url":"https://api.github.com/repos/alphagov/gds-api-adapters/contributors","subscribers_url":"https://api.github.com/repos/alphagov/gds-api-adapters/subscribers","subscription_url":"https://api.github.com/repos/alphagov/gds-api-adapters/subscription","commits_url":"https://api.github.com/repos/alphagov/gds-api-adapters/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/gds-api-adapters/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/gds-api-adapters/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/gds-api-adapters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/gds-api-adapters/merges","archive_url":"https://api.github.com/repos/alphagov/gds-api-adapters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/gds-api-adapters/downloads","issues_url":"https://api.github.com/repos/alphagov/gds-api-adapters/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/gds-api-adapters/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/gds-api-adapters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/gds-api-adapters/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/gds-api-adapters/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/gds-api-adapters/deployments","created_at":"2011-12-02T14:13:57Z","updated_at":"2016-05-07T23:50:12Z","pushed_at":"2016-07-29T12:09:48Z","git_url":"git://github.com/alphagov/gds-api-adapters.git","ssh_url":"git@github.com:alphagov/gds-api-adapters.git","clone_url":"https://github.com/alphagov/gds-api-adapters.git","svn_url":"https://github.com/alphagov/gds-api-adapters","homepage":"","size":1489,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":4,"forks":8,"open_issues":4,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544"},"html":{"href":"https://github.com/alphagov/gds-api-adapters/pull/544"},"issue":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/544"},"comments":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/gds-api-adapters/statuses/99081a0760e779ffcbfa4ff04d2818f35cceb070"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":40,"deletions":1,"changed_files":5}}
{"actor":{"display_login":"tijmenb"}}