{"action":"closed","number":177,"pull_request":{"url":"https://api.github.com/repos/gocardless/hutch/pulls/177","id":48008984,"html_url":"https://github.com/gocardless/hutch/pull/177","diff_url":"https://github.com/gocardless/hutch/pull/177.diff","patch_url":"https://github.com/gocardless/hutch/pull/177.patch","issue_url":"https://api.github.com/repos/gocardless/hutch/issues/177","number":177,"state":"closed","locked":false,"title":"Customizable error response handling (custom nacks)","user":{"login":"dkastner","id":16464,"avatar_url":"https://avatars.githubusercontent.com/u/16464?v=3","gravatar_id":"","url":"https://api.github.com/users/dkastner","html_url":"https://github.com/dkastner","followers_url":"https://api.github.com/users/dkastner/followers","following_url":"https://api.github.com/users/dkastner/following{/other_user}","gists_url":"https://api.github.com/users/dkastner/gists{/gist_id}","starred_url":"https://api.github.com/users/dkastner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkastner/subscriptions","organizations_url":"https://api.github.com/users/dkastner/orgs","repos_url":"https://api.github.com/users/dkastner/repos","events_url":"https://api.github.com/users/dkastner/events{/privacy}","received_events_url":"https://api.github.com/users/dkastner/received_events","type":"User","site_admin":false},"body":"Code related to https://github.com/gocardless/hutch/issues/165\r\n\r\nBy default a nack is always sent on an exception.\r\n\r\nAllows configuring custom handlers similar to the way logging is configured:\r\n\r\n``` ruby\r\nclass Requeue\r\n  def handle(delivery_info, properties, broker, e)\r\n    if e.is_a?(Net::HTTPRetriableError) && !delivery_info.redelivered\r\n      broker.requeue delivery_info.delivery_tag\r\n      true\r\n    else\r\n      # Pass and let default nack handler nack the message\r\n      false\r\n    end\r\n  end\r\nend\r\n\r\nHutch::Config.set :error_acknowledgements, [\r\n  Requeue.new\r\n]\r\n```","created_at":"2015-10-18T13:59:31Z","updated_at":"2015-11-08T09:00:47Z","closed_at":"2015-11-08T09:00:47Z","merged_at":"2015-11-08T09:00:47Z","merge_commit_sha":"793f9501a72bdd837836821bad84f658057df592","assignee":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gocardless/hutch/pulls/177/commits","review_comments_url":"https://api.github.com/repos/gocardless/hutch/pulls/177/comments","review_comment_url":"https://api.github.com/repos/gocardless/hutch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gocardless/hutch/issues/177/comments","statuses_url":"https://api.github.com/repos/gocardless/hutch/statuses/e9e3a1fb7ed038b88cab47197fd7824b5fb46558","head":{"label":"dkastner:reject-fix","ref":"reject-fix","sha":"e9e3a1fb7ed038b88cab47197fd7824b5fb46558","user":{"login":"dkastner","id":16464,"avatar_url":"https://avatars.githubusercontent.com/u/16464?v=3","gravatar_id":"","url":"https://api.github.com/users/dkastner","html_url":"https://github.com/dkastner","followers_url":"https://api.github.com/users/dkastner/followers","following_url":"https://api.github.com/users/dkastner/following{/other_user}","gists_url":"https://api.github.com/users/dkastner/gists{/gist_id}","starred_url":"https://api.github.com/users/dkastner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkastner/subscriptions","organizations_url":"https://api.github.com/users/dkastner/orgs","repos_url":"https://api.github.com/users/dkastner/repos","events_url":"https://api.github.com/users/dkastner/events{/privacy}","received_events_url":"https://api.github.com/users/dkastner/received_events","type":"User","site_admin":false},"repo":{"id":40268618,"name":"hutch","full_name":"dkastner/hutch","owner":{"login":"dkastner","id":16464,"avatar_url":"https://avatars.githubusercontent.com/u/16464?v=3","gravatar_id":"","url":"https://api.github.com/users/dkastner","html_url":"https://github.com/dkastner","followers_url":"https://api.github.com/users/dkastner/followers","following_url":"https://api.github.com/users/dkastner/following{/other_user}","gists_url":"https://api.github.com/users/dkastner/gists{/gist_id}","starred_url":"https://api.github.com/users/dkastner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkastner/subscriptions","organizations_url":"https://api.github.com/users/dkastner/orgs","repos_url":"https://api.github.com/users/dkastner/repos","events_url":"https://api.github.com/users/dkastner/events{/privacy}","received_events_url":"https://api.github.com/users/dkastner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkastner/hutch","description":"A system for processing messages from RabbitMQ.","fork":true,"url":"https://api.github.com/repos/dkastner/hutch","forks_url":"https://api.github.com/repos/dkastner/hutch/forks","keys_url":"https://api.github.com/repos/dkastner/hutch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkastner/hutch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkastner/hutch/teams","hooks_url":"https://api.github.com/repos/dkastner/hutch/hooks","issue_events_url":"https://api.github.com/repos/dkastner/hutch/issues/events{/number}","events_url":"https://api.github.com/repos/dkastner/hutch/events","assignees_url":"https://api.github.com/repos/dkastner/hutch/assignees{/user}","branches_url":"https://api.github.com/repos/dkastner/hutch/branches{/branch}","tags_url":"https://api.github.com/repos/dkastner/hutch/tags","blobs_url":"https://api.github.com/repos/dkastner/hutch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkastner/hutch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkastner/hutch/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkastner/hutch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkastner/hutch/statuses/{sha}","languages_url":"https://api.github.com/repos/dkastner/hutch/languages","stargazers_url":"https://api.github.com/repos/dkastner/hutch/stargazers","contributors_url":"https://api.github.com/repos/dkastner/hutch/contributors","subscribers_url":"https://api.github.com/repos/dkastner/hutch/subscribers","subscription_url":"https://api.github.com/repos/dkastner/hutch/subscription","commits_url":"https://api.github.com/repos/dkastner/hutch/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkastner/hutch/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkastner/hutch/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkastner/hutch/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkastner/hutch/contents/{+path}","compare_url":"https://api.github.com/repos/dkastner/hutch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkastner/hutch/merges","archive_url":"https://api.github.com/repos/dkastner/hutch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkastner/hutch/downloads","issues_url":"https://api.github.com/repos/dkastner/hutch/issues{/number}","pulls_url":"https://api.github.com/repos/dkastner/hutch/pulls{/number}","milestones_url":"https://api.github.com/repos/dkastner/hutch/milestones{/number}","notifications_url":"https://api.github.com/repos/dkastner/hutch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkastner/hutch/labels{/name}","releases_url":"https://api.github.com/repos/dkastner/hutch/releases{/id}","created_at":"2015-08-05T21:00:36Z","updated_at":"2015-08-05T21:00:36Z","pushed_at":"2015-09-03T02:38:10Z","git_url":"git://github.com/dkastner/hutch.git","ssh_url":"git@github.com:dkastner/hutch.git","clone_url":"https://github.com/dkastner/hutch.git","svn_url":"https://github.com/dkastner/hutch","homepage":"https://gocardless.com/blog/hutch-inter-service-communication-with-rabbitmq/","size":490,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gocardless:master","ref":"master","sha":"d4dba953a4ce75fb8d9c5ad2095dcb37d3fbbd5a","user":{"login":"gocardless","id":790629,"avatar_url":"https://avatars.githubusercontent.com/u/790629?v=3","gravatar_id":"","url":"https://api.github.com/users/gocardless","html_url":"https://github.com/gocardless","followers_url":"https://api.github.com/users/gocardless/followers","following_url":"https://api.github.com/users/gocardless/following{/other_user}","gists_url":"https://api.github.com/users/gocardless/gists{/gist_id}","starred_url":"https://api.github.com/users/gocardless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocardless/subscriptions","organizations_url":"https://api.github.com/users/gocardless/orgs","repos_url":"https://api.github.com/users/gocardless/repos","events_url":"https://api.github.com/users/gocardless/events{/privacy}","received_events_url":"https://api.github.com/users/gocardless/received_events","type":"Organization","site_admin":false},"repo":{"id":7777086,"name":"hutch","full_name":"gocardless/hutch","owner":{"login":"gocardless","id":790629,"avatar_url":"https://avatars.githubusercontent.com/u/790629?v=3","gravatar_id":"","url":"https://api.github.com/users/gocardless","html_url":"https://github.com/gocardless","followers_url":"https://api.github.com/users/gocardless/followers","following_url":"https://api.github.com/users/gocardless/following{/other_user}","gists_url":"https://api.github.com/users/gocardless/gists{/gist_id}","starred_url":"https://api.github.com/users/gocardless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocardless/subscriptions","organizations_url":"https://api.github.com/users/gocardless/orgs","repos_url":"https://api.github.com/users/gocardless/repos","events_url":"https://api.github.com/users/gocardless/events{/privacy}","received_events_url":"https://api.github.com/users/gocardless/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gocardless/hutch","description":"A system for processing messages from RabbitMQ.","fork":false,"url":"https://api.github.com/repos/gocardless/hutch","forks_url":"https://api.github.com/repos/gocardless/hutch/forks","keys_url":"https://api.github.com/repos/gocardless/hutch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gocardless/hutch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gocardless/hutch/teams","hooks_url":"https://api.github.com/repos/gocardless/hutch/hooks","issue_events_url":"https://api.github.com/repos/gocardless/hutch/issues/events{/number}","events_url":"https://api.github.com/repos/gocardless/hutch/events","assignees_url":"https://api.github.com/repos/gocardless/hutch/assignees{/user}","branches_url":"https://api.github.com/repos/gocardless/hutch/branches{/branch}","tags_url":"https://api.github.com/repos/gocardless/hutch/tags","blobs_url":"https://api.github.com/repos/gocardless/hutch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gocardless/hutch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gocardless/hutch/git/refs{/sha}","trees_url":"https://api.github.com/repos/gocardless/hutch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gocardless/hutch/statuses/{sha}","languages_url":"https://api.github.com/repos/gocardless/hutch/languages","stargazers_url":"https://api.github.com/repos/gocardless/hutch/stargazers","contributors_url":"https://api.github.com/repos/gocardless/hutch/contributors","subscribers_url":"https://api.github.com/repos/gocardless/hutch/subscribers","subscription_url":"https://api.github.com/repos/gocardless/hutch/subscription","commits_url":"https://api.github.com/repos/gocardless/hutch/commits{/sha}","git_commits_url":"https://api.github.com/repos/gocardless/hutch/git/commits{/sha}","comments_url":"https://api.github.com/repos/gocardless/hutch/comments{/number}","issue_comment_url":"https://api.github.com/repos/gocardless/hutch/issues/comments{/number}","contents_url":"https://api.github.com/repos/gocardless/hutch/contents/{+path}","compare_url":"https://api.github.com/repos/gocardless/hutch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gocardless/hutch/merges","archive_url":"https://api.github.com/repos/gocardless/hutch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gocardless/hutch/downloads","issues_url":"https://api.github.com/repos/gocardless/hutch/issues{/number}","pulls_url":"https://api.github.com/repos/gocardless/hutch/pulls{/number}","milestones_url":"https://api.github.com/repos/gocardless/hutch/milestones{/number}","notifications_url":"https://api.github.com/repos/gocardless/hutch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gocardless/hutch/labels{/name}","releases_url":"https://api.github.com/repos/gocardless/hutch/releases{/id}","created_at":"2013-01-23T15:14:34Z","updated_at":"2015-11-07T08:27:49Z","pushed_at":"2015-11-08T09:00:47Z","git_url":"git://github.com/gocardless/hutch.git","ssh_url":"git@github.com:gocardless/hutch.git","clone_url":"https://github.com/gocardless/hutch.git","svn_url":"https://github.com/gocardless/hutch","homepage":"https://gocardless.com/blog/hutch-inter-service-communication-with-rabbitmq/","size":1593,"stargazers_count":476,"watchers_count":476,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":9,"forks":79,"open_issues":9,"watchers":476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gocardless/hutch/pulls/177"},"html":{"href":"https://github.com/gocardless/hutch/pull/177"},"issue":{"href":"https://api.github.com/repos/gocardless/hutch/issues/177"},"comments":{"href":"https://api.github.com/repos/gocardless/hutch/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/gocardless/hutch/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/gocardless/hutch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gocardless/hutch/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/gocardless/hutch/statuses/e9e3a1fb7ed038b88cab47197fd7824b5fb46558"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"comments":1,"review_comments":4,"commits":2,"additions":87,"deletions":1,"changed_files":4}}